{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Callbacks and Events\n",
    "\n",
    "In working with a differential equation, our system will evolve through many states. Particular states of the system may be of interest to us, and we say that an ***\"event\"*** is triggered when our system reaches these states. For example, events may include the moment when our system reaches a particular temperature or velocity. We ***handle*** these events with ***callbacks***, which tell us what to do once an event has been triggered.\n",
    "\n",
    "These callbacks allow for a lot more than event handling, however. For example, we can use callbacks to achieve high-level behavior like exactly preserve conservation laws and save the trace of a matrix at pre-defined time points. This extra functionality allows us to use the callback system as a modding system for the DiffEq ecosystem's solvers. \n",
    "\n",
    "This tutorial is an introduction to the callback and event handling system in DifferentialEquations.jl, documented in the [Event Handling and Callback Functions](http://docs.juliadiffeq.org/latest/features/callback_functions.html) page of the documentation. We will also introduce you to some of the most widely used callbacks in the [Callback Library](http://docs.juliadiffeq.org/latest/features/callback_library.html), which is a library of pre-built mods."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Events and Continuous Callbacks\n",
    "\n",
    "Event handling is done through continuous callbacks. Callbacks take a function, `condition`, which triggers an `affect!` when `condition == 0`. These callbacks are called \"continuous\" because they will utilize rootfinding on the interpolation to find the \"exact\" time point at which the condition takes place and apply the `affect!` at that time point.\n",
    "\n",
    "***Let's use a bouncing ball as a simple system to explain events and callbacks.*** Let's take Newton's model of a ball falling towards the Earth's surface via a gravitational constant `g`. In this case, the velocity is changing via `-g`, and position is changing via the velocity. Therefore we receive the system of ODEs:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\u001b[1m\u001b[33mWARNING: \u001b[39m\u001b[22m\u001b[33mJacobian could not invert\u001b[39m\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "(::BallBounce) (generic function with 8 methods)"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "using DifferentialEquations\n",
    "ball! = @ode_def BallBounce begin\n",
    "  dy =  v\n",
    "  dv = -g\n",
    "end g"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We want the callback to trigger when `y=0` since that's when the ball will hit the Earth's surface -- our event. We do this with the condition:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "condition (generic function with 1 method)"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "function condition(u,t,integrator) # Event when event_f(u,t) == 0\n",
    "  u[1]\n",
    "end"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Recall that the `condition` will trigger when it evaluates to zero, and here it will evaluate to zero when `u[1] == 0`, which occurs when `v == 0`. *Now we have to say what we want the callback to do.* Callbacks make use of the [Integrator Interface](http://docs.juliadiffeq.org/latest/basics/integrator.html). Instead of giving a full description, a quick and usable rundown is:\n",
    "\n",
    "- Values are strored in `integrator.u`\n",
    "- Times are stored in `integrator.t`\n",
    "- The parameters are stored in `integrator.p`\n",
    "- `integrator(t)` performs an interpolation in the current interval between `integrator.tprev` and `integrator.t` (and allows extrapolation)\n",
    "- User-defined options (tolerances, etc.) are stored in `integrator.opts`\n",
    "- `integrator.sol` is the current solution object. Note that `integrator.sol.prob` is the current problem\n",
    "\n",
    "While there's a lot more on the integrator interface page, that's a working knowledge of what's there.\n",
    "\n",
    "What we want to do with our `affect!` is to \"make the ball bounce\". Mathematically speaking, the ball bounces when the sign of the velocity flips. As an added behavior, let's also use a small friction constant to dampen the ball's velocity. This way only a percentage of the velocity will be retained when the event is triggered and the callback is used.  We'll define this behavior in the `affect!` function:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "affect! (generic function with 1 method)"
      ]
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "function affect!(integrator)\n",
    "    integrator.u[2] = -integrator.p[2] * integrator.u[2]\n",
    "end"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "`integrator.u[2]` is the second value of our model, which is `v` or velocity, and `integrator.p[2]`, is our friction coefficient.\n",
    "\n",
    "Therefore `affect!` can be read as follows: `affect!` will take the current value of velocity, and multiply it `-1` multiplied by our friction coefficient. Therefore the ball will change direction and its velocity will dampen when `affect!` is called.\n",
    "\n",
    "Now let's build the `ContinuousCallback`:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "DiffEqBase.ContinuousCallback{#condition,#affect!,#affect!,DiffEqBase.#INITIALIZE_DEFAULT,Float64,Int64,Void}(condition, affect!, affect!, DiffEqBase.INITIALIZE_DEFAULT, nothing, true, 10, (true, true), 1.0e-9, 0)"
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bounce_cb = ContinuousCallback(condition,affect!)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Now let's make an `ODEProblem` which has our callback:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "DiffEqBase.ODEProblem with uType Array{Float64,1} and tType Float64. In-place: true\n",
       "timespan: (0.0, 15.0)\n",
       "u0: [50.0, 0.0]"
      ]
     },
     "execution_count": 42,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "u0 = [50.0,0.0]\n",
    "tspan = (0.0,15.0)\n",
    "p = (9.8,0.9)\n",
    "prob = ODEProblem(ball!,u0,tspan,p,callback=bounce_cb)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Notice that we chose a friction constant of `0.9`. Now we can solve the problem and plot the solution as we normally would:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n",
       "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"600\" height=\"400\" viewBox=\"0 0 600 400\">\n",
       "<defs>\n",
       "  <clipPath id=\"clip1300\">\n",
       "    <rect x=\"0\" y=\"0\" width=\"600\" height=\"400\"/>\n",
       "  </clipPath>\n",
       "</defs>\n",
       "<polygon clip-path=\"url(#clip1300)\" points=\"\n",
       "0,400 600,400 600,0 0,0 \n",
       "  \" fill=\"#ffffff\" fill-opacity=\"1\"/>\n",
       "<defs>\n",
       "  <clipPath id=\"clip1301\">\n",
       "    <rect x=\"120\" y=\"0\" width=\"421\" height=\"400\"/>\n",
       "  </clipPath>\n",
       "</defs>\n",
       "<polygon clip-path=\"url(#clip1300)\" points=\"\n",
       "35.8488,360.065 580.315,360.065 580.315,11.811 35.8488,11.811 \n",
       "  \" fill=\"#ffffff\" fill-opacity=\"1\"/>\n",
       "<defs>\n",
       "  <clipPath id=\"clip1302\">\n",
       "    <rect x=\"35\" y=\"11\" width=\"545\" height=\"349\"/>\n",
       "  </clipPath>\n",
       "</defs>\n",
       "<polyline clip-path=\"url(#clip1302)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  35.8488,360.065 35.8488,11.811 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1302)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  217.338,360.065 217.338,11.811 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1302)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  398.826,360.065 398.826,11.811 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1302)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  580.315,360.065 580.315,11.811 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1302)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  35.8488,312.048 580.315,312.048 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1302)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  35.8488,226.266 580.315,226.266 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1302)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  35.8488,140.484 580.315,140.484 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1302)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  35.8488,54.702 580.315,54.702 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1300)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  35.8488,360.065 580.315,360.065 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1300)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  35.8488,360.065 35.8488,11.811 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1300)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  35.8488,360.065 35.8488,354.842 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1300)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  217.338,360.065 217.338,354.842 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1300)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  398.826,360.065 398.826,354.842 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1300)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  580.315,360.065 580.315,354.842 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1300)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  35.8488,312.048 44.0158,312.048 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1300)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  35.8488,226.266 44.0158,226.266 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1300)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  35.8488,140.484 44.0158,140.484 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1300)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  35.8488,54.702 44.0158,54.702 \n",
       "  \"/>\n",
       "<g clip-path=\"url(#clip1300)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 35.8488, 373.865)\" x=\"35.8488\" y=\"373.865\">0</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip1300)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 217.338, 373.865)\" x=\"217.338\" y=\"373.865\">5</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip1300)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 398.826, 373.865)\" x=\"398.826\" y=\"373.865\">10</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip1300)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 580.315, 373.865)\" x=\"580.315\" y=\"373.865\">15</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip1300)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:end;\" transform=\"rotate(0, 29.8488, 316.548)\" x=\"29.8488\" y=\"316.548\">-20</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip1300)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:end;\" transform=\"rotate(0, 29.8488, 230.766)\" x=\"29.8488\" y=\"230.766\">0</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip1300)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:end;\" transform=\"rotate(0, 29.8488, 144.984)\" x=\"29.8488\" y=\"144.984\">20</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip1300)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:end;\" transform=\"rotate(0, 29.8488, 59.202)\" x=\"29.8488\" y=\"59.202\">40</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip1300)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:16; text-anchor:middle;\" transform=\"rotate(0, 308.082, 397.6)\" x=\"308.082\" y=\"397.6\">t</text>\n",
       "</g>\n",
       "<polyline clip-path=\"url(#clip1302)\" style=\"stroke:#009af9; stroke-width:3; stroke-opacity:1; fill:none\" points=\"\n",
       "  35.8488,11.811 36.3938,11.8158 36.9388,11.83 37.4838,11.8537 38.0288,11.8868 38.5738,11.9295 39.1188,11.9816 39.6639,12.0432 40.2089,12.1143 40.7539,12.1948 \n",
       "  41.2989,12.2848 41.8439,12.3843 42.3889,12.4933 42.9339,12.6118 43.4789,12.7397 44.0239,12.8771 44.569,13.024 45.114,13.1804 45.659,13.3462 46.204,13.5215 \n",
       "  46.749,13.7063 47.294,13.9006 47.839,14.1043 48.384,14.3175 48.929,14.5402 49.4741,14.7724 50.0191,15.0141 50.5641,15.2652 51.1091,15.5258 51.6541,15.7959 \n",
       "  52.1991,16.0754 52.7441,16.3644 53.2891,16.6629 53.8341,16.9709 54.3792,17.2884 54.9242,17.6153 55.4692,17.9517 56.0142,18.2976 56.5592,18.653 57.1042,19.0178 \n",
       "  57.6492,19.3922 58.1942,19.7759 58.7392,20.1692 59.2843,20.572 59.8293,20.9842 60.3743,21.4059 60.9193,21.8371 61.4643,22.2777 62.0093,22.7278 62.5543,23.1875 \n",
       "  63.0993,23.6565 63.6443,24.1351 64.1894,24.6231 64.7344,25.1206 65.2794,25.6276 65.8244,26.1441 66.3694,26.67 66.9144,27.2055 67.4594,27.7503 68.0044,28.3047 \n",
       "  68.5494,28.8686 69.0945,29.4419 69.6395,30.0247 70.1845,30.617 70.7295,31.2187 71.2745,31.8299 71.8195,32.4506 72.3645,33.0808 72.9095,33.7205 73.4545,34.3696 \n",
       "  73.9996,35.0282 74.5446,35.6963 75.0896,36.3739 75.6346,37.0609 76.1796,37.7574 76.7246,38.4634 77.2696,39.1789 77.8146,39.9038 78.3596,40.6383 78.9047,41.3822 \n",
       "  79.4497,42.1355 79.9947,42.8984 80.5397,43.6707 81.0847,44.4525 81.6297,45.2438 82.1747,46.0446 82.7197,46.8548 83.2647,47.6745 83.8098,48.5037 84.3548,49.3423 \n",
       "  84.8998,50.1905 85.4448,51.0481 85.9898,51.9152 86.5348,52.7918 87.0798,53.6778 87.6248,54.5733 88.1698,55.4783 88.7149,56.3928 89.2599,57.3167 89.8049,58.2502 \n",
       "  90.3499,59.1931 90.8949,60.1455 91.4399,61.1073 91.9849,62.0786 92.5299,63.0595 93.0749,64.0497 93.62,65.0495 94.165,66.0587 94.71,67.0775 95.255,68.1056 \n",
       "  95.8,69.1433 96.345,70.1905 96.89,71.2471 97.435,72.3132 97.98,73.3887 98.5251,74.4738 99.0701,75.5683 99.6151,76.6723 100.16,77.7858 100.705,78.9088 \n",
       "  101.25,80.0412 101.795,81.1831 102.34,82.3345 102.885,83.4953 103.43,84.6657 103.975,85.8455 104.52,87.0348 105.065,88.2335 105.61,89.4418 106.155,90.6595 \n",
       "  106.7,91.8867 107.245,93.1234 107.79,94.3695 108.335,95.6251 108.88,96.8902 109.425,98.1648 109.97,99.4489 110.515,100.742 111.06,102.045 111.605,103.358 \n",
       "  112.15,104.68 112.695,106.011 113.24,107.352 113.785,108.703 114.33,110.062 114.875,111.432 115.42,112.811 115.965,114.199 116.51,115.597 117.055,117.004 \n",
       "  117.6,118.421 118.145,119.847 118.69,121.283 119.235,122.728 119.78,124.182 120.326,125.646 120.871,127.12 121.416,128.603 121.961,130.096 122.506,131.598 \n",
       "  123.051,133.109 123.596,134.63 124.141,136.16 124.686,137.7 125.231,139.25 125.776,140.809 126.321,142.377 126.866,143.955 127.411,145.542 127.956,147.139 \n",
       "  128.501,148.745 129.046,150.361 129.591,151.986 130.136,153.621 130.681,155.265 131.226,156.919 131.771,158.582 132.316,160.254 132.861,161.936 133.406,163.628 \n",
       "  133.951,165.329 134.496,167.039 135.041,168.759 135.586,170.489 136.131,172.228 136.676,173.976 137.221,175.734 137.766,177.501 138.311,179.278 138.856,181.064 \n",
       "  139.401,182.86 139.946,184.666 140.491,186.48 141.036,188.304 141.581,190.138 142.126,191.981 142.671,193.834 143.216,195.696 143.761,197.568 144.306,199.449 \n",
       "  144.851,201.339 145.396,203.239 145.941,205.149 146.486,207.068 147.031,208.996 147.576,210.934 148.121,212.882 148.666,214.838 149.211,216.805 149.756,218.781 \n",
       "  150.301,220.766 150.846,222.761 151.391,224.765 151.936,225.805 152.481,223.998 153.026,222.2 153.571,220.412 154.116,218.633 154.661,216.864 155.206,215.104 \n",
       "  155.751,213.353 156.296,211.612 156.841,209.881 157.386,208.159 157.931,206.446 158.476,204.743 159.021,203.049 159.566,201.365 160.111,199.691 160.656,198.025 \n",
       "  161.201,196.37 161.746,194.724 162.291,193.087 162.836,191.46 163.381,189.842 163.926,188.233 164.471,186.635 165.016,185.045 165.561,183.465 166.106,181.895 \n",
       "  166.651,180.334 167.196,178.783 167.741,177.241 168.286,175.708 168.832,174.185 169.377,172.672 169.922,171.167 170.467,169.673 171.012,168.188 171.557,166.712 \n",
       "  172.102,165.246 172.647,163.789 173.192,162.342 173.737,160.904 174.282,159.476 174.827,158.057 175.372,156.648 175.917,155.248 176.462,153.858 177.007,152.477 \n",
       "  177.552,151.106 178.097,149.744 178.642,148.391 179.187,147.048 179.732,145.715 180.277,144.391 180.822,143.076 181.367,141.771 181.912,140.475 182.457,139.189 \n",
       "  183.002,137.913 183.547,136.646 184.092,135.388 184.637,134.14 185.182,132.901 185.727,131.672 186.272,130.452 186.817,129.242 187.362,128.041 187.907,126.849 \n",
       "  188.452,125.668 188.997,124.495 189.542,123.332 190.087,122.179 190.632,121.035 191.177,119.9 191.722,118.775 192.267,117.66 192.812,116.554 193.357,115.457 \n",
       "  193.902,114.37 194.447,113.292 194.992,112.224 195.537,111.166 196.082,110.116 196.627,109.077 197.172,108.046 197.717,107.026 198.262,106.014 198.807,105.013 \n",
       "  199.352,104.02 199.897,103.037 200.442,102.064 200.987,101.1 201.532,100.146 202.077,99.2006 202.622,98.2651 203.167,97.3391 203.712,96.4226 204.257,95.5156 \n",
       "  204.802,94.618 205.347,93.7299 205.892,92.8512 206.437,91.9821 206.982,91.1224 207.527,90.2722 208.072,89.4315 208.617,88.6003 209.162,87.7785 209.707,86.9662 \n",
       "  210.252,86.1634 210.797,85.37 211.342,84.5862 211.887,83.8118 212.432,83.0469 212.977,82.2915 213.522,81.5455 214.067,80.809 214.612,80.082 215.157,79.3645 \n",
       "  215.702,78.6564 216.247,77.9579 216.792,77.2688 217.338,76.5891 217.883,75.919 218.428,75.2583 218.973,74.6071 219.518,73.9654 220.063,73.3332 220.608,72.7104 \n",
       "  221.153,72.0971 221.698,71.4933 222.243,70.899 222.788,70.3141 223.333,69.7387 223.878,69.1728 224.423,68.6164 224.968,68.0695 225.513,67.532 226.058,67.004 \n",
       "  226.603,66.4855 227.148,65.9764 227.693,65.4768 228.238,64.9868 228.783,64.5061 229.328,64.035 229.873,63.5733 230.418,63.1211 230.963,62.6784 231.508,62.2452 \n",
       "  232.053,61.8214 232.598,61.4072 233.143,61.0024 233.688,60.607 234.233,60.2212 234.778,59.8448 235.323,59.4779 235.868,59.1205 236.413,58.7725 236.958,58.434 \n",
       "  237.503,58.1051 238.048,57.7855 238.593,57.4755 239.138,57.1749 239.683,56.8838 240.228,56.6022 240.773,56.3301 241.318,56.0674 241.863,55.8142 242.408,55.5705 \n",
       "  242.953,55.3363 243.498,55.1116 244.043,54.8963 244.588,54.6905 245.133,54.4942 245.678,54.3073 246.223,54.1299 246.768,53.962 247.313,53.8036 247.858,53.6547 \n",
       "  248.403,53.5152 248.948,53.3852 249.493,53.2647 250.038,53.1537 250.583,53.0521 251.128,52.96 251.673,52.8774 252.218,52.8043 252.763,52.7406 253.308,52.6865 \n",
       "  253.853,52.6418 254.398,52.6065 254.943,52.5808 255.488,52.5645 256.033,52.5577 256.578,52.5604 257.123,52.5725 257.668,52.5942 258.213,52.6253 258.758,52.6659 \n",
       "  259.303,52.7159 259.848,52.7755 260.393,52.8445 260.938,52.923 261.483,53.0109 262.028,53.1084 262.573,53.2153 263.118,53.3317 263.663,53.4576 264.208,53.5929 \n",
       "  264.753,53.7378 265.298,53.8921 265.843,54.0558 266.389,54.2291 266.934,54.4118 267.479,54.604 268.024,54.8057 268.569,55.0169 269.114,55.2375 269.659,55.4676 \n",
       "  270.204,55.7072 270.749,55.9563 271.294,56.2148 271.839,56.4828 272.384,56.7603 272.929,57.0473 273.474,57.3438 274.019,57.6497 274.564,57.9651 275.109,58.29 \n",
       "  275.654,58.6243 276.199,58.9682 276.744,59.3215 277.289,59.6842 277.834,60.0565 278.379,60.4382 278.924,60.8295 279.469,61.2301 280.014,61.6403 280.559,62.0599 \n",
       "  281.104,62.4891 281.649,62.9277 282.194,63.3757 282.739,63.8333 283.284,64.3003 283.829,64.7768 284.374,65.2628 284.919,65.7582 285.464,66.2632 286.009,66.7776 \n",
       "  286.554,67.3015 287.099,67.8348 287.644,68.3776 288.189,68.93 288.734,69.4917 289.279,70.063 289.824,70.6438 290.369,71.234 290.914,71.8337 291.459,72.4428 \n",
       "  292.004,73.0615 292.549,73.6896 293.094,74.3272 293.639,74.9743 294.184,75.6308 294.729,76.2969 295.274,76.9724 295.819,77.6573 296.364,78.3518 296.909,79.0557 \n",
       "  297.454,79.7692 297.999,80.492 298.544,81.2244 299.089,81.9662 299.634,82.7176 300.179,83.4784 300.724,84.2486 301.269,85.0284 301.814,85.8176 302.359,86.6163 \n",
       "  302.904,87.4245 303.449,88.2421 303.994,89.0692 304.539,89.9058 305.084,90.7519 305.629,91.6075 306.174,92.4725 306.719,93.347 307.264,94.231 307.809,95.1245 \n",
       "  308.354,96.0274 308.899,96.9398 309.444,97.8617 309.989,98.7931 310.534,99.7339 311.079,100.684 311.624,101.644 312.169,102.613 312.714,103.592 313.259,104.58 \n",
       "  313.804,105.578 314.349,106.585 314.895,107.602 315.44,108.628 315.985,109.664 316.53,110.709 317.075,111.763 317.62,112.827 318.165,113.901 318.71,114.984 \n",
       "  319.255,116.076 319.8,117.178 320.345,118.29 320.89,119.41 321.435,120.541 321.98,121.681 322.525,122.83 323.07,123.989 323.615,125.157 324.16,126.335 \n",
       "  324.705,127.522 325.25,128.719 325.795,129.925 326.34,131.141 326.885,132.366 327.43,133.6 327.975,134.845 328.52,136.098 329.065,137.361 329.61,138.634 \n",
       "  330.155,139.916 330.7,141.207 331.245,142.508 331.79,143.818 332.335,145.138 332.88,146.468 333.425,147.807 333.97,149.155 334.515,150.513 335.06,151.88 \n",
       "  335.605,153.257 336.15,154.643 336.695,156.039 337.24,157.444 337.785,158.859 338.33,160.283 338.875,161.716 339.42,163.159 339.965,164.612 340.51,166.074 \n",
       "  341.055,167.546 341.6,169.027 342.145,170.517 342.69,172.017 343.235,173.526 343.78,175.045 344.325,176.574 344.87,178.112 345.415,179.659 345.96,181.216 \n",
       "  346.505,182.782 347.05,184.358 347.595,185.943 348.14,187.538 348.685,189.142 349.23,190.756 349.775,192.379 350.32,194.011 350.865,195.653 351.41,197.305 \n",
       "  351.955,198.966 352.5,200.637 353.045,202.317 353.59,204.006 354.135,205.705 354.68,207.414 355.225,209.131 355.77,210.859 356.315,212.596 356.86,214.342 \n",
       "  357.405,216.098 357.95,217.863 358.495,219.638 359.04,221.422 359.585,223.216 360.13,225.019 360.675,225.758 361.22,224.133 361.765,222.517 362.31,220.91 \n",
       "  362.855,219.313 363.401,217.726 363.946,216.148 364.491,214.58 365.036,213.021 365.581,211.471 366.126,209.931 366.671,208.4 367.216,206.879 367.761,205.368 \n",
       "  368.306,203.866 368.851,202.373 369.396,200.89 369.941,199.416 370.486,197.952 371.031,196.497 371.576,195.052 372.121,193.616 372.666,192.19 373.211,190.773 \n",
       "  373.756,189.366 374.301,187.968 374.846,186.579 375.391,185.2 375.936,183.831 376.481,182.471 377.026,181.12 377.571,179.779 378.116,178.448 378.661,177.126 \n",
       "  379.206,175.813 379.751,174.51 380.296,173.216 380.841,171.932 381.386,170.657 381.931,169.392 382.476,168.136 383.021,166.89 383.566,165.653 384.111,164.426 \n",
       "  384.656,163.208 385.201,162 385.746,160.801 386.291,159.612 386.836,158.432 387.381,157.261 387.926,156.1 388.471,154.949 389.016,153.807 389.561,152.674 \n",
       "  390.106,151.551 390.651,150.437 391.196,149.333 391.741,148.239 392.286,147.154 392.831,146.078 393.376,145.012 393.921,143.955 394.466,142.908 395.011,141.87 \n",
       "  395.556,140.842 396.101,139.823 396.646,138.813 397.191,137.813 397.736,136.823 398.281,135.842 398.826,134.871 399.371,133.909 399.916,132.956 400.461,132.013 \n",
       "  401.006,131.08 401.551,130.156 402.096,129.241 402.641,128.336 403.186,127.44 403.731,126.554 404.276,125.677 404.821,124.81 405.366,123.952 405.911,123.104 \n",
       "  406.456,122.265 407.001,121.436 407.546,120.616 408.091,119.806 408.636,119.005 409.181,118.214 409.726,117.432 410.271,116.659 410.816,115.896 411.361,115.143 \n",
       "  411.906,114.399 412.452,113.664 412.997,112.939 413.542,112.224 414.087,111.517 414.632,110.821 415.177,110.134 415.722,109.456 416.267,108.788 416.812,108.129 \n",
       "  417.357,107.48 417.902,106.84 418.447,106.21 418.992,105.589 419.537,104.977 420.082,104.376 420.627,103.783 421.172,103.2 421.717,102.627 422.262,102.063 \n",
       "  422.807,101.508 423.352,100.963 423.897,100.428 424.442,99.9018 424.987,99.3852 425.532,98.8781 426.077,98.3805 426.622,97.8923 427.167,97.4136 427.712,96.9444 \n",
       "  428.257,96.4847 428.802,96.0345 429.347,95.5937 429.892,95.1624 430.437,94.7406 430.982,94.3282 431.527,93.9254 432.072,93.532 432.617,93.1481 433.162,92.7736 \n",
       "  433.707,92.4087 434.252,92.0532 434.797,91.7072 435.342,91.3706 435.887,91.0436 436.432,90.726 436.977,90.4179 437.522,90.1193 438.067,89.8301 438.612,89.5504 \n",
       "  439.157,89.2802 439.702,89.0195 440.247,88.7683 440.792,88.5265 441.337,88.2942 441.882,88.0714 442.427,87.8581 442.972,87.6542 443.517,87.4598 444.062,87.2749 \n",
       "  444.607,87.0995 445.152,86.9335 445.697,86.777 446.242,86.63 446.787,86.4925 447.332,86.3644 447.877,86.2459 448.422,86.1368 448.967,86.0371 449.512,85.947 \n",
       "  450.057,85.8663 450.602,85.7951 451.147,85.7334 451.692,85.6812 452.237,85.6384 452.782,85.6051 453.327,85.5813 453.872,85.567 454.417,85.5621 454.962,85.5667 \n",
       "  455.507,85.5808 456.052,85.6044 456.597,85.6374 457.142,85.68 457.687,85.732 458.232,85.7934 458.777,85.8644 459.322,85.9448 459.867,86.0347 460.412,86.1341 \n",
       "  460.958,86.243 461.503,86.3613 462.048,86.4891 462.593,86.6264 463.138,86.7732 463.683,86.9294 464.228,87.0951 464.773,87.2703 465.318,87.455 465.863,87.6491 \n",
       "  466.408,87.8528 466.953,88.0659 467.498,88.2884 468.043,88.5205 468.588,88.762 469.133,89.013 469.678,89.2735 470.223,89.5435 470.768,89.8229 471.313,90.1118 \n",
       "  471.858,90.4102 472.403,90.7181 472.948,91.0354 473.493,91.3622 474.038,91.6985 474.583,92.0443 475.128,92.3995 475.673,92.7642 476.218,93.1384 476.763,93.5221 \n",
       "  477.308,93.9153 477.853,94.3179 478.398,94.73 478.943,95.1516 479.488,95.5826 480.033,96.0232 480.578,96.4732 481.123,96.9327 481.668,97.4016 482.213,97.8801 \n",
       "  482.758,98.368 483.303,98.8654 483.848,99.3722 484.393,99.8886 484.938,100.414 485.483,100.95 486.028,101.494 486.573,102.049 487.118,102.612 487.663,103.186 \n",
       "  488.208,103.768 488.753,104.36 489.298,104.962 489.843,105.573 490.388,106.194 490.933,106.824 491.478,107.463 492.023,108.112 492.568,108.771 493.113,109.439 \n",
       "  493.658,110.116 494.203,110.803 494.748,111.5 495.293,112.206 495.838,112.921 496.383,113.646 496.928,114.38 497.473,115.124 498.018,115.877 498.563,116.64 \n",
       "  499.108,117.412 499.653,118.194 500.198,118.985 500.743,119.785 501.288,120.596 501.833,121.415 502.378,122.244 502.923,123.083 503.468,123.931 504.013,124.788 \n",
       "  504.558,125.655 505.103,126.532 505.648,127.418 506.193,128.313 506.738,129.218 507.283,130.132 507.828,131.056 508.373,131.989 508.918,132.932 509.464,133.884 \n",
       "  510.009,134.846 510.554,135.817 511.099,136.798 511.644,137.788 512.189,138.788 512.734,139.797 513.279,140.816 513.824,141.844 514.369,142.881 514.914,143.928 \n",
       "  515.459,144.985 516.004,146.051 516.549,147.126 517.094,148.211 517.639,149.305 518.184,150.409 518.729,151.523 519.274,152.646 519.819,153.778 520.364,154.92 \n",
       "  520.909,156.071 521.454,157.232 521.999,158.402 522.544,159.582 523.089,160.771 523.634,161.969 524.179,163.177 524.724,164.395 525.269,165.622 525.814,166.859 \n",
       "  526.359,168.105 526.904,169.36 527.449,170.625 527.994,171.9 528.539,173.184 529.084,174.477 529.629,175.78 530.174,177.092 530.719,178.414 531.264,179.745 \n",
       "  531.809,181.086 532.354,182.436 532.899,183.796 533.444,185.165 533.989,186.544 534.534,187.932 535.079,189.33 535.624,190.737 536.169,192.154 536.714,193.58 \n",
       "  537.259,195.015 537.804,196.46 538.349,197.915 538.894,199.379 539.439,200.852 539.984,202.335 540.529,203.828 541.074,205.33 541.619,206.841 542.164,208.362 \n",
       "  542.709,209.892 543.254,211.432 543.799,212.981 544.344,214.54 544.889,216.108 545.434,217.686 545.979,219.273 546.524,220.87 547.069,222.476 547.614,224.091 \n",
       "  548.159,225.717 548.704,225.294 549.249,223.835 549.794,222.386 550.339,220.946 550.884,219.516 551.429,218.095 551.974,216.684 552.519,215.282 553.064,213.889 \n",
       "  553.609,212.506 554.154,211.133 554.699,209.769 555.244,208.415 555.789,207.07 556.334,205.734 556.879,204.408 557.424,203.092 557.97,201.785 558.515,200.487 \n",
       "  559.06,199.199 559.605,197.92 560.15,196.651 560.695,195.391 561.24,194.141 561.785,192.9 562.33,191.669 562.875,190.447 563.42,189.235 563.965,188.032 \n",
       "  564.51,186.839 565.055,185.655 565.6,184.481 566.145,183.316 566.69,182.16 567.235,181.014 567.78,179.878 568.325,178.751 568.87,177.633 569.415,176.525 \n",
       "  569.96,175.427 570.505,174.337 571.05,173.258 571.595,172.188 572.14,171.127 572.685,170.076 573.23,169.034 573.775,168.002 574.32,166.979 574.865,165.966 \n",
       "  575.41,164.962 575.955,163.968 576.5,162.983 577.045,162.007 577.59,161.041 578.135,160.085 578.68,159.138 579.225,158.201 579.77,157.273 580.315,156.354 \n",
       "  \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1302)\" style=\"stroke:#e26f46; stroke-width:3; stroke-opacity:1; fill:none\" points=\"\n",
       "  35.8488,226.266 36.3938,226.897 36.9388,227.528 37.4838,228.159 38.0288,228.791 38.5738,229.422 39.1188,230.053 39.6639,230.684 40.2089,231.315 40.7539,231.946 \n",
       "  41.2989,232.577 41.8439,233.208 42.3889,233.84 42.9339,234.471 43.4789,235.102 44.0239,235.733 44.569,236.364 45.114,236.995 45.659,237.626 46.204,238.258 \n",
       "  46.749,238.889 47.294,239.52 47.839,240.151 48.384,240.782 48.929,241.413 49.4741,242.044 50.0191,242.675 50.5641,243.307 51.1091,243.938 51.6541,244.569 \n",
       "  52.1991,245.2 52.7441,245.831 53.2891,246.462 53.8341,247.093 54.3792,247.724 54.9242,248.356 55.4692,248.987 56.0142,249.618 56.5592,250.249 57.1042,250.88 \n",
       "  57.6492,251.511 58.1942,252.142 58.7392,252.773 59.2843,253.405 59.8293,254.036 60.3743,254.667 60.9193,255.298 61.4643,255.929 62.0093,256.56 62.5543,257.191 \n",
       "  63.0993,257.823 63.6443,258.454 64.1894,259.085 64.7344,259.716 65.2794,260.347 65.8244,260.978 66.3694,261.609 66.9144,262.24 67.4594,262.872 68.0044,263.503 \n",
       "  68.5494,264.134 69.0945,264.765 69.6395,265.396 70.1845,266.027 70.7295,266.658 71.2745,267.289 71.8195,267.921 72.3645,268.552 72.9095,269.183 73.4545,269.814 \n",
       "  73.9996,270.445 74.5446,271.076 75.0896,271.707 75.6346,272.338 76.1796,272.97 76.7246,273.601 77.2696,274.232 77.8146,274.863 78.3596,275.494 78.9047,276.125 \n",
       "  79.4497,276.756 79.9947,277.388 80.5397,278.019 81.0847,278.65 81.6297,279.281 82.1747,279.912 82.7197,280.543 83.2647,281.174 83.8098,281.805 84.3548,282.437 \n",
       "  84.8998,283.068 85.4448,283.699 85.9898,284.33 86.5348,284.961 87.0798,285.592 87.6248,286.223 88.1698,286.854 88.7149,287.486 89.2599,288.117 89.8049,288.748 \n",
       "  90.3499,289.379 90.8949,290.01 91.4399,290.641 91.9849,291.272 92.5299,291.903 93.0749,292.535 93.62,293.166 94.165,293.797 94.71,294.428 95.255,295.059 \n",
       "  95.8,295.69 96.345,296.321 96.89,296.953 97.435,297.584 97.98,298.215 98.5251,298.846 99.0701,299.477 99.6151,300.108 100.16,300.739 100.705,301.37 \n",
       "  101.25,302.002 101.795,302.633 102.34,303.264 102.885,303.895 103.43,304.526 103.975,305.157 104.52,305.788 105.065,306.419 105.61,307.051 106.155,307.682 \n",
       "  106.7,308.313 107.245,308.944 107.79,309.575 108.335,310.206 108.88,310.837 109.425,311.468 109.97,312.1 110.515,312.731 111.06,313.362 111.605,313.993 \n",
       "  112.15,314.624 112.695,315.255 113.24,315.886 113.785,316.518 114.33,317.149 114.875,317.78 115.42,318.411 115.965,319.042 116.51,319.673 117.055,320.304 \n",
       "  117.6,320.935 118.145,321.567 118.69,322.198 119.235,322.829 119.78,323.46 120.326,324.091 120.871,324.722 121.416,325.353 121.961,325.984 122.506,326.616 \n",
       "  123.051,327.247 123.596,327.878 124.141,328.509 124.686,329.14 125.231,329.771 125.776,330.402 126.321,331.033 126.866,331.665 127.411,332.296 127.956,332.927 \n",
       "  128.501,333.558 129.046,334.189 129.591,334.82 130.136,335.451 130.681,336.083 131.226,336.714 131.771,337.345 132.316,337.976 132.861,338.607 133.406,339.238 \n",
       "  133.951,339.869 134.496,340.5 135.041,341.132 135.586,341.763 136.131,342.394 136.676,343.025 137.221,343.656 137.766,344.287 138.311,344.918 138.856,345.549 \n",
       "  139.401,346.181 139.946,346.812 140.491,347.443 141.036,348.074 141.581,348.705 142.126,349.336 142.671,349.967 143.216,350.598 143.761,351.23 144.306,351.861 \n",
       "  144.851,352.492 145.396,353.123 145.941,353.754 146.486,354.385 147.031,355.016 147.576,355.648 148.121,356.279 148.666,356.91 149.211,357.541 149.756,358.172 \n",
       "  150.301,358.803 150.846,359.434 151.391,360.065 151.936,105.583 152.481,106.214 153.026,106.846 153.571,107.477 154.116,108.108 154.661,108.739 155.206,109.37 \n",
       "  155.751,110.001 156.296,110.632 156.841,111.264 157.386,111.895 157.931,112.526 158.476,113.157 159.021,113.788 159.566,114.419 160.111,115.05 160.656,115.681 \n",
       "  161.201,116.313 161.746,116.944 162.291,117.575 162.836,118.206 163.381,118.837 163.926,119.468 164.471,120.099 165.016,120.73 165.561,121.362 166.106,121.993 \n",
       "  166.651,122.624 167.196,123.255 167.741,123.886 168.286,124.517 168.832,125.148 169.377,125.779 169.922,126.411 170.467,127.042 171.012,127.673 171.557,128.304 \n",
       "  172.102,128.935 172.647,129.566 173.192,130.197 173.737,130.829 174.282,131.46 174.827,132.091 175.372,132.722 175.917,133.353 176.462,133.984 177.007,134.615 \n",
       "  177.552,135.246 178.097,135.878 178.642,136.509 179.187,137.14 179.732,137.771 180.277,138.402 180.822,139.033 181.367,139.664 181.912,140.295 182.457,140.927 \n",
       "  183.002,141.558 183.547,142.189 184.092,142.82 184.637,143.451 185.182,144.082 185.727,144.713 186.272,145.344 186.817,145.976 187.362,146.607 187.907,147.238 \n",
       "  188.452,147.869 188.997,148.5 189.542,149.131 190.087,149.762 190.632,150.394 191.177,151.025 191.722,151.656 192.267,152.287 192.812,152.918 193.357,153.549 \n",
       "  193.902,154.18 194.447,154.811 194.992,155.443 195.537,156.074 196.082,156.705 196.627,157.336 197.172,157.967 197.717,158.598 198.262,159.229 198.807,159.86 \n",
       "  199.352,160.492 199.897,161.123 200.442,161.754 200.987,162.385 201.532,163.016 202.077,163.647 202.622,164.278 203.167,164.909 203.712,165.541 204.257,166.172 \n",
       "  204.802,166.803 205.347,167.434 205.892,168.065 206.437,168.696 206.982,169.327 207.527,169.959 208.072,170.59 208.617,171.221 209.162,171.852 209.707,172.483 \n",
       "  210.252,173.114 210.797,173.745 211.342,174.376 211.887,175.008 212.432,175.639 212.977,176.27 213.522,176.901 214.067,177.532 214.612,178.163 215.157,178.794 \n",
       "  215.702,179.425 216.247,180.057 216.792,180.688 217.338,181.319 217.883,181.95 218.428,182.581 218.973,183.212 219.518,183.843 220.063,184.474 220.608,185.106 \n",
       "  221.153,185.737 221.698,186.368 222.243,186.999 222.788,187.63 223.333,188.261 223.878,188.892 224.423,189.524 224.968,190.155 225.513,190.786 226.058,191.417 \n",
       "  226.603,192.048 227.148,192.679 227.693,193.31 228.238,193.941 228.783,194.573 229.328,195.204 229.873,195.835 230.418,196.466 230.963,197.097 231.508,197.728 \n",
       "  232.053,198.359 232.598,198.99 233.143,199.622 233.688,200.253 234.233,200.884 234.778,201.515 235.323,202.146 235.868,202.777 236.413,203.408 236.958,204.039 \n",
       "  237.503,204.671 238.048,205.302 238.593,205.933 239.138,206.564 239.683,207.195 240.228,207.826 240.773,208.457 241.318,209.089 241.863,209.72 242.408,210.351 \n",
       "  242.953,210.982 243.498,211.613 244.043,212.244 244.588,212.875 245.133,213.506 245.678,214.138 246.223,214.769 246.768,215.4 247.313,216.031 247.858,216.662 \n",
       "  248.403,217.293 248.948,217.924 249.493,218.555 250.038,219.187 250.583,219.818 251.128,220.449 251.673,221.08 252.218,221.711 252.763,222.342 253.308,222.973 \n",
       "  253.853,223.604 254.398,224.236 254.943,224.867 255.488,225.498 256.033,226.129 256.578,226.76 257.123,227.391 257.668,228.022 258.213,228.654 258.758,229.285 \n",
       "  259.303,229.916 259.848,230.547 260.393,231.178 260.938,231.809 261.483,232.44 262.028,233.071 262.573,233.703 263.118,234.334 263.663,234.965 264.208,235.596 \n",
       "  264.753,236.227 265.298,236.858 265.843,237.489 266.389,238.12 266.934,238.752 267.479,239.383 268.024,240.014 268.569,240.645 269.114,241.276 269.659,241.907 \n",
       "  270.204,242.538 270.749,243.169 271.294,243.801 271.839,244.432 272.384,245.063 272.929,245.694 273.474,246.325 274.019,246.956 274.564,247.587 275.109,248.219 \n",
       "  275.654,248.85 276.199,249.481 276.744,250.112 277.289,250.743 277.834,251.374 278.379,252.005 278.924,252.636 279.469,253.268 280.014,253.899 280.559,254.53 \n",
       "  281.104,255.161 281.649,255.792 282.194,256.423 282.739,257.054 283.284,257.685 283.829,258.317 284.374,258.948 284.919,259.579 285.464,260.21 286.009,260.841 \n",
       "  286.554,261.472 287.099,262.103 287.644,262.734 288.189,263.366 288.734,263.997 289.279,264.628 289.824,265.259 290.369,265.89 290.914,266.521 291.459,267.152 \n",
       "  292.004,267.784 292.549,268.415 293.094,269.046 293.639,269.677 294.184,270.308 294.729,270.939 295.274,271.57 295.819,272.201 296.364,272.833 296.909,273.464 \n",
       "  297.454,274.095 297.999,274.726 298.544,275.357 299.089,275.988 299.634,276.619 300.179,277.25 300.724,277.882 301.269,278.513 301.814,279.144 302.359,279.775 \n",
       "  302.904,280.406 303.449,281.037 303.994,281.668 304.539,282.299 305.084,282.931 305.629,283.562 306.174,284.193 306.719,284.824 307.264,285.455 307.809,286.086 \n",
       "  308.354,286.717 308.899,287.349 309.444,287.98 309.989,288.611 310.534,289.242 311.079,289.873 311.624,290.504 312.169,291.135 312.714,291.766 313.259,292.398 \n",
       "  313.804,293.029 314.349,293.66 314.895,294.291 315.44,294.922 315.985,295.553 316.53,296.184 317.075,296.815 317.62,297.447 318.165,298.078 318.71,298.709 \n",
       "  319.255,299.34 319.8,299.971 320.345,300.602 320.89,301.233 321.435,301.864 321.98,302.496 322.525,303.127 323.07,303.758 323.615,304.389 324.16,305.02 \n",
       "  324.705,305.651 325.25,306.282 325.795,306.914 326.34,307.545 326.885,308.176 327.43,308.807 327.975,309.438 328.52,310.069 329.065,310.7 329.61,311.331 \n",
       "  330.155,311.963 330.7,312.594 331.245,313.225 331.79,313.856 332.335,314.487 332.88,315.118 333.425,315.749 333.97,316.38 334.515,317.012 335.06,317.643 \n",
       "  335.605,318.274 336.15,318.905 336.695,319.536 337.24,320.167 337.785,320.798 338.33,321.429 338.875,322.061 339.42,322.692 339.965,323.323 340.51,323.954 \n",
       "  341.055,324.585 341.6,325.216 342.145,325.847 342.69,326.478 343.235,327.11 343.78,327.741 344.325,328.372 344.87,329.003 345.415,329.634 345.96,330.265 \n",
       "  346.505,330.896 347.05,331.528 347.595,332.159 348.14,332.79 348.685,333.421 349.23,334.052 349.775,334.683 350.32,335.314 350.865,335.945 351.41,336.577 \n",
       "  351.955,337.208 352.5,337.839 353.045,338.47 353.59,339.101 354.135,339.732 354.68,340.363 355.225,340.994 355.77,341.626 356.315,342.257 356.86,342.888 \n",
       "  357.405,343.519 357.95,344.15 358.495,344.781 359.04,345.412 359.585,346.043 360.13,346.675 360.675,117.704 361.22,118.335 361.765,118.966 362.31,119.597 \n",
       "  362.855,120.228 363.401,120.86 363.946,121.491 364.491,122.122 365.036,122.753 365.581,123.384 366.126,124.015 366.671,124.646 367.216,125.277 367.761,125.909 \n",
       "  368.306,126.54 368.851,127.171 369.396,127.802 369.941,128.433 370.486,129.064 371.031,129.695 371.576,130.326 372.121,130.958 372.666,131.589 373.211,132.22 \n",
       "  373.756,132.851 374.301,133.482 374.846,134.113 375.391,134.744 375.936,135.375 376.481,136.007 377.026,136.638 377.571,137.269 378.116,137.9 378.661,138.531 \n",
       "  379.206,139.162 379.751,139.793 380.296,140.425 380.841,141.056 381.386,141.687 381.931,142.318 382.476,142.949 383.021,143.58 383.566,144.211 384.111,144.842 \n",
       "  384.656,145.474 385.201,146.105 385.746,146.736 386.291,147.367 386.836,147.998 387.381,148.629 387.926,149.26 388.471,149.891 389.016,150.523 389.561,151.154 \n",
       "  390.106,151.785 390.651,152.416 391.196,153.047 391.741,153.678 392.286,154.309 392.831,154.94 393.376,155.572 393.921,156.203 394.466,156.834 395.011,157.465 \n",
       "  395.556,158.096 396.101,158.727 396.646,159.358 397.191,159.99 397.736,160.621 398.281,161.252 398.826,161.883 399.371,162.514 399.916,163.145 400.461,163.776 \n",
       "  401.006,164.407 401.551,165.039 402.096,165.67 402.641,166.301 403.186,166.932 403.731,167.563 404.276,168.194 404.821,168.825 405.366,169.456 405.911,170.088 \n",
       "  406.456,170.719 407.001,171.35 407.546,171.981 408.091,172.612 408.636,173.243 409.181,173.874 409.726,174.505 410.271,175.137 410.816,175.768 411.361,176.399 \n",
       "  411.906,177.03 412.452,177.661 412.997,178.292 413.542,178.923 414.087,179.555 414.632,180.186 415.177,180.817 415.722,181.448 416.267,182.079 416.812,182.71 \n",
       "  417.357,183.341 417.902,183.972 418.447,184.604 418.992,185.235 419.537,185.866 420.082,186.497 420.627,187.128 421.172,187.759 421.717,188.39 422.262,189.021 \n",
       "  422.807,189.653 423.352,190.284 423.897,190.915 424.442,191.546 424.987,192.177 425.532,192.808 426.077,193.439 426.622,194.07 427.167,194.702 427.712,195.333 \n",
       "  428.257,195.964 428.802,196.595 429.347,197.226 429.892,197.857 430.437,198.488 430.982,199.12 431.527,199.751 432.072,200.382 432.617,201.013 433.162,201.644 \n",
       "  433.707,202.275 434.252,202.906 434.797,203.537 435.342,204.169 435.887,204.8 436.432,205.431 436.977,206.062 437.522,206.693 438.067,207.324 438.612,207.955 \n",
       "  439.157,208.586 439.702,209.218 440.247,209.849 440.792,210.48 441.337,211.111 441.882,211.742 442.427,212.373 442.972,213.004 443.517,213.635 444.062,214.267 \n",
       "  444.607,214.898 445.152,215.529 445.697,216.16 446.242,216.791 446.787,217.422 447.332,218.053 447.877,218.685 448.422,219.316 448.967,219.947 449.512,220.578 \n",
       "  450.057,221.209 450.602,221.84 451.147,222.471 451.692,223.102 452.237,223.734 452.782,224.365 453.327,224.996 453.872,225.627 454.417,226.258 454.962,226.889 \n",
       "  455.507,227.52 456.052,228.151 456.597,228.783 457.142,229.414 457.687,230.045 458.232,230.676 458.777,231.307 459.322,231.938 459.867,232.569 460.412,233.2 \n",
       "  460.958,233.832 461.503,234.463 462.048,235.094 462.593,235.725 463.138,236.356 463.683,236.987 464.228,237.618 464.773,238.25 465.318,238.881 465.863,239.512 \n",
       "  466.408,240.143 466.953,240.774 467.498,241.405 468.043,242.036 468.588,242.667 469.133,243.299 469.678,243.93 470.223,244.561 470.768,245.192 471.313,245.823 \n",
       "  471.858,246.454 472.403,247.085 472.948,247.716 473.493,248.348 474.038,248.979 474.583,249.61 475.128,250.241 475.673,250.872 476.218,251.503 476.763,252.134 \n",
       "  477.308,252.765 477.853,253.397 478.398,254.028 478.943,254.659 479.488,255.29 480.033,255.921 480.578,256.552 481.123,257.183 481.668,257.815 482.213,258.446 \n",
       "  482.758,259.077 483.303,259.708 483.848,260.339 484.393,260.97 484.938,261.601 485.483,262.232 486.028,262.864 486.573,263.495 487.118,264.126 487.663,264.757 \n",
       "  488.208,265.388 488.753,266.019 489.298,266.65 489.843,267.281 490.388,267.913 490.933,268.544 491.478,269.175 492.023,269.806 492.568,270.437 493.113,271.068 \n",
       "  493.658,271.699 494.203,272.33 494.748,272.962 495.293,273.593 495.838,274.224 496.383,274.855 496.928,275.486 497.473,276.117 498.018,276.748 498.563,277.38 \n",
       "  499.108,278.011 499.653,278.642 500.198,279.273 500.743,279.904 501.288,280.535 501.833,281.166 502.378,281.797 502.923,282.429 503.468,283.06 504.013,283.691 \n",
       "  504.558,284.322 505.103,284.953 505.648,285.584 506.193,286.215 506.738,286.846 507.283,287.478 507.828,288.109 508.373,288.74 508.918,289.371 509.464,290.002 \n",
       "  510.009,290.633 510.554,291.264 511.099,291.895 511.644,292.527 512.189,293.158 512.734,293.789 513.279,294.42 513.824,295.051 514.369,295.682 514.914,296.313 \n",
       "  515.459,296.945 516.004,297.576 516.549,298.207 517.094,298.838 517.639,299.469 518.184,300.1 518.729,300.731 519.274,301.362 519.819,301.994 520.364,302.625 \n",
       "  520.909,303.256 521.454,303.887 521.999,304.518 522.544,305.149 523.089,305.78 523.634,306.411 524.179,307.043 524.724,307.674 525.269,308.305 525.814,308.936 \n",
       "  526.359,309.567 526.904,310.198 527.449,310.829 527.994,311.46 528.539,312.092 529.084,312.723 529.629,313.354 530.174,313.985 530.719,314.616 531.264,315.247 \n",
       "  531.809,315.878 532.354,316.51 532.899,317.141 533.444,317.772 533.989,318.403 534.534,319.034 535.079,319.665 535.624,320.296 536.169,320.927 536.714,321.559 \n",
       "  537.259,322.19 537.804,322.821 538.349,323.452 538.894,324.083 539.439,324.714 539.984,325.345 540.529,325.976 541.074,326.608 541.619,327.239 542.164,327.87 \n",
       "  542.709,328.501 543.254,329.132 543.799,329.763 544.344,330.394 544.889,331.025 545.434,331.657 545.979,332.288 546.524,332.919 547.069,333.55 547.614,334.181 \n",
       "  548.159,334.812 548.704,128.802 549.249,129.433 549.794,130.064 550.339,130.695 550.884,131.326 551.429,131.957 551.974,132.588 552.519,133.22 553.064,133.851 \n",
       "  553.609,134.482 554.154,135.113 554.699,135.744 555.244,136.375 555.789,137.006 556.334,137.638 556.879,138.269 557.424,138.9 557.97,139.531 558.515,140.162 \n",
       "  559.06,140.793 559.605,141.424 560.15,142.055 560.695,142.687 561.24,143.318 561.785,143.949 562.33,144.58 562.875,145.211 563.42,145.842 563.965,146.473 \n",
       "  564.51,147.104 565.055,147.736 565.6,148.367 566.145,148.998 566.69,149.629 567.235,150.26 567.78,150.891 568.325,151.522 568.87,152.153 569.415,152.785 \n",
       "  569.96,153.416 570.505,154.047 571.05,154.678 571.595,155.309 572.14,155.94 572.685,156.571 573.23,157.203 573.775,157.834 574.32,158.465 574.865,159.096 \n",
       "  575.41,159.727 575.955,160.358 576.5,160.989 577.045,161.62 577.59,162.252 578.135,162.883 578.68,163.514 579.225,164.145 579.77,164.776 580.315,165.407 \n",
       "  \n",
       "  \"/>\n",
       "<polygon clip-path=\"url(#clip1300)\" points=\"\n",
       "485.201,78.051 562.315,78.051 562.315,32.691 485.201,32.691 \n",
       "  \" fill=\"#ffffff\" fill-opacity=\"1\"/>\n",
       "<polyline clip-path=\"url(#clip1300)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  485.201,78.051 562.315,78.051 562.315,32.691 485.201,32.691 485.201,78.051 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1300)\" style=\"stroke:#009af9; stroke-width:3; stroke-opacity:1; fill:none\" points=\"\n",
       "  491.201,47.811 527.201,47.811 \n",
       "  \"/>\n",
       "<g clip-path=\"url(#clip1300)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:start;\" transform=\"rotate(0, 533.201, 52.311)\" x=\"533.201\" y=\"52.311\">y(t)</text>\n",
       "</g>\n",
       "<polyline clip-path=\"url(#clip1300)\" style=\"stroke:#e26f46; stroke-width:3; stroke-opacity:1; fill:none\" points=\"\n",
       "  491.201,62.931 527.201,62.931 \n",
       "  \"/>\n",
       "<g clip-path=\"url(#clip1300)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:start;\" transform=\"rotate(0, 533.201, 67.431)\" x=\"533.201\" y=\"67.431\">v(t)</text>\n",
       "</g>\n",
       "</svg>\n"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sol = solve(prob,Tsit5())\n",
    "using Plots; gr()\n",
    "plot(sol)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "and tada, the ball bounces! Notice that the `ContinuousCallback` is using the interpolation to apply the effect \"exactly\" when `v == 0`. This is crucial for model correctness, and thus when this property is needed a `ContinuousCallback` should be used. "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Exercise 1\n",
    "\n",
    "In our example we used a constant coefficient of friction, but if we are bouncing the ball in the same place we may be smoothing the surface (say, squishing the grass), causing there to be less friction after each bounce. In this more advanced model, we want the friction coefficient at the next bounce to be `sqrt(friction)` from the previous bounce (since `friction < 1`, `sqrt(friction) > friction` and `sqrt(friction) < 1`).\n",
    "\n",
    "Hint: there are many ways to implement this. One way to do it is to make `p` a `Vector` and mutate the friction coefficient in the `affect!`."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Discrete Callbacks\n",
    "\n",
    "A discrete callback checks a `condition` after every integration step and, if true, it will apply an `affect!`. For example, let's say that at time `t=2` we want to include that a kid kicked the ball, adding `20` to the current velocity. This kind of situation, where we want to add a specific behavior which does not require rootfinding, is a good candidate for a `DiscreteCallback`. In this case, the `condition` is a boolean for whether to apply the `affect!`, so:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "condition_kick (generic function with 1 method)"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "function condition_kick(u,t,integrator)\n",
    "    t == 2\n",
    "end"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We want the kick to occur at `t=2`, so we check for that time point. When we are at this time point, we want to do:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "affect_kick! (generic function with 1 method)"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "function affect_kick!(integrator)\n",
    "    integrator.u[2] += 50\n",
    "end"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Now we build the problem as before:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "DiffEqBase.ODEProblem with uType Array{Float64,1} and tType Float64. In-place: true\n",
       "timespan: (0.0, 10.0)\n",
       "u0: [50.0, 0.0]"
      ]
     },
     "execution_count": 45,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "kick_cb = DiscreteCallback(condition_kick,affect_kick!)\n",
    "u0 = [50.0,0.0]\n",
    "tspan = (0.0,10.0)\n",
    "p = (9.8,0.9)\n",
    "prob = ODEProblem(ball!,u0,tspan,p,callback=kick_cb)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Note that, since we are requiring our effect at exactly the time `t=2`, we need to tell the integration scheme to step at exactly `t=2` to apply this callback. This is done via the option `tstops`, which is like `saveat` but means \"stop at these values\"."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n",
       "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"600\" height=\"400\" viewBox=\"0 0 600 400\">\n",
       "<defs>\n",
       "  <clipPath id=\"clip1500\">\n",
       "    <rect x=\"0\" y=\"0\" width=\"600\" height=\"400\"/>\n",
       "  </clipPath>\n",
       "</defs>\n",
       "<polygon clip-path=\"url(#clip1500)\" points=\"\n",
       "0,400 600,400 600,0 0,0 \n",
       "  \" fill=\"#ffffff\" fill-opacity=\"1\"/>\n",
       "<defs>\n",
       "  <clipPath id=\"clip1501\">\n",
       "    <rect x=\"120\" y=\"0\" width=\"421\" height=\"400\"/>\n",
       "  </clipPath>\n",
       "</defs>\n",
       "<polygon clip-path=\"url(#clip1500)\" points=\"\n",
       "35.8488,360.065 580.315,360.065 580.315,11.811 35.8488,11.811 \n",
       "  \" fill=\"#ffffff\" fill-opacity=\"1\"/>\n",
       "<defs>\n",
       "  <clipPath id=\"clip1502\">\n",
       "    <rect x=\"35\" y=\"11\" width=\"545\" height=\"349\"/>\n",
       "  </clipPath>\n",
       "</defs>\n",
       "<polyline clip-path=\"url(#clip1502)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  35.8488,360.065 35.8488,11.811 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1502)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  144.742,360.065 144.742,11.811 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1502)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  253.635,360.065 253.635,11.811 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1502)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  362.528,360.065 362.528,11.811 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1502)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  471.422,360.065 471.422,11.811 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1502)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  580.315,360.065 580.315,11.811 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1502)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  35.8488,296.268 580.315,296.268 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1502)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  35.8488,226.923 580.315,226.923 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1502)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  35.8488,157.577 580.315,157.577 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1502)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  35.8488,88.2322 580.315,88.2322 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1502)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  35.8488,18.8869 580.315,18.8869 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1500)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  35.8488,360.065 580.315,360.065 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1500)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  35.8488,360.065 35.8488,11.811 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1500)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  35.8488,360.065 35.8488,354.842 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1500)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  144.742,360.065 144.742,354.842 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1500)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  253.635,360.065 253.635,354.842 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1500)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  362.528,360.065 362.528,354.842 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1500)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  471.422,360.065 471.422,354.842 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1500)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  580.315,360.065 580.315,354.842 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1500)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  35.8488,296.268 44.0158,296.268 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1500)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  35.8488,226.923 44.0158,226.923 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1500)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  35.8488,157.577 44.0158,157.577 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1500)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  35.8488,88.2322 44.0158,88.2322 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1500)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  35.8488,18.8869 44.0158,18.8869 \n",
       "  \"/>\n",
       "<g clip-path=\"url(#clip1500)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 35.8488, 373.865)\" x=\"35.8488\" y=\"373.865\">0</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip1500)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 144.742, 373.865)\" x=\"144.742\" y=\"373.865\">2</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip1500)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 253.635, 373.865)\" x=\"253.635\" y=\"373.865\">4</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip1500)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 362.528, 373.865)\" x=\"362.528\" y=\"373.865\">6</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip1500)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 471.422, 373.865)\" x=\"471.422\" y=\"373.865\">8</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip1500)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 580.315, 373.865)\" x=\"580.315\" y=\"373.865\">10</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip1500)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:end;\" transform=\"rotate(0, 29.8488, 300.768)\" x=\"29.8488\" y=\"300.768\">-25</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip1500)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:end;\" transform=\"rotate(0, 29.8488, 231.423)\" x=\"29.8488\" y=\"231.423\">0</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip1500)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:end;\" transform=\"rotate(0, 29.8488, 162.077)\" x=\"29.8488\" y=\"162.077\">25</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip1500)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:end;\" transform=\"rotate(0, 29.8488, 92.7322)\" x=\"29.8488\" y=\"92.7322\">50</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip1500)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:end;\" transform=\"rotate(0, 29.8488, 23.3869)\" x=\"29.8488\" y=\"23.3869\">75</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip1500)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:16; text-anchor:middle;\" transform=\"rotate(0, 308.082, 397.6)\" x=\"308.082\" y=\"397.6\">t</text>\n",
       "</g>\n",
       "<polyline clip-path=\"url(#clip1502)\" style=\"stroke:#009af9; stroke-width:3; stroke-opacity:1; fill:none\" points=\"\n",
       "  35.8488,88.2322 36.3938,88.2335 36.9388,88.2376 37.4838,88.2444 38.0288,88.2539 38.5738,88.2662 39.1188,88.2812 39.6639,88.2989 40.2089,88.3193 40.7539,88.3425 \n",
       "  41.2989,88.3683 41.8439,88.3969 42.3889,88.4283 42.9339,88.4623 43.4789,88.4991 44.0239,88.5386 44.569,88.5808 45.114,88.6257 45.659,88.6734 46.204,88.7238 \n",
       "  46.749,88.7769 47.294,88.8328 47.839,88.8913 48.384,88.9526 48.929,89.0166 49.4741,89.0833 50.0191,89.1528 50.5641,89.225 51.1091,89.2999 51.6541,89.3775 \n",
       "  52.1991,89.4579 52.7441,89.5409 53.2891,89.6267 53.8341,89.7153 54.3792,89.8065 54.9242,89.9005 55.4692,89.9972 56.0142,90.0966 56.5592,90.1987 57.1042,90.3036 \n",
       "  57.6492,90.4112 58.1942,90.5215 58.7392,90.6345 59.2843,90.7503 59.8293,90.8688 60.3743,90.99 60.9193,91.1139 61.4643,91.2406 62.0093,91.3699 62.5543,91.5021 \n",
       "  63.0993,91.6369 63.6443,91.7744 64.1894,91.9147 64.7344,92.0577 65.2794,92.2034 65.8244,92.3519 66.3694,92.503 66.9144,92.6569 67.4594,92.8136 68.0044,92.9729 \n",
       "  68.5494,93.135 69.0945,93.2997 69.6395,93.4673 70.1845,93.6375 70.7295,93.8105 71.2745,93.9861 71.8195,94.1645 72.3645,94.3457 72.9095,94.5295 73.4545,94.7161 \n",
       "  73.9996,94.9054 74.5446,95.0974 75.0896,95.2922 75.6346,95.4897 76.1796,95.6899 76.7246,95.8928 77.2696,96.0984 77.8146,96.3068 78.3596,96.5179 78.9047,96.7317 \n",
       "  79.4497,96.9482 79.9947,97.1675 80.5397,97.3895 81.0847,97.6142 81.6297,97.8416 82.1747,98.0718 82.7197,98.3047 83.2647,98.5403 83.8098,98.7786 84.3548,99.0197 \n",
       "  84.8998,99.2635 85.4448,99.51 85.9898,99.7592 86.5348,100.011 87.0798,100.266 87.6248,100.523 88.1698,100.783 88.7149,101.046 89.2599,101.312 89.8049,101.58 \n",
       "  90.3499,101.851 90.8949,102.125 91.4399,102.401 91.9849,102.68 92.5299,102.962 93.0749,103.247 93.62,103.534 94.165,103.824 94.71,104.117 95.255,104.413 \n",
       "  95.8,104.711 96.345,105.012 96.89,105.316 97.435,105.622 97.98,105.931 98.5251,106.243 99.0701,106.558 99.6151,106.875 100.16,107.195 100.705,107.518 \n",
       "  101.25,107.843 101.795,108.172 102.34,108.503 102.885,108.836 103.43,109.173 103.975,109.512 104.52,109.854 105.065,110.198 105.61,110.545 106.155,110.895 \n",
       "  106.7,111.248 107.245,111.604 107.79,111.962 108.335,112.323 108.88,112.686 109.425,113.053 109.97,113.422 110.515,113.793 111.06,114.168 111.605,114.545 \n",
       "  112.15,114.925 112.695,115.308 113.24,115.693 113.785,116.081 114.33,116.472 114.875,116.866 115.42,117.262 115.965,117.661 116.51,118.063 117.055,118.467 \n",
       "  117.6,118.875 118.145,119.285 118.69,119.697 119.235,120.113 119.78,120.531 120.326,120.952 120.871,121.375 121.416,121.801 121.961,122.23 122.506,122.662 \n",
       "  123.051,123.097 123.596,123.534 124.141,123.974 124.686,124.416 125.231,124.862 125.776,125.31 126.321,125.76 126.866,126.214 127.411,126.67 127.956,127.129 \n",
       "  128.501,127.591 129.046,128.055 129.591,128.522 130.136,128.992 130.681,129.465 131.226,129.94 131.771,130.418 132.316,130.899 132.861,131.382 133.406,131.868 \n",
       "  133.951,132.357 134.496,132.849 135.041,133.343 135.586,133.84 136.131,134.34 136.676,134.843 137.221,135.348 137.766,135.856 138.311,136.367 138.856,136.88 \n",
       "  139.401,137.396 139.946,137.915 140.491,138.437 141.036,138.961 141.581,139.488 142.126,140.018 142.671,140.55 143.216,141.086 143.761,141.624 144.306,142.164 \n",
       "  144.851,142.43 145.396,141.588 145.941,140.748 146.486,139.912 147.031,139.078 147.576,138.246 148.121,137.418 148.666,136.592 149.211,135.769 149.756,134.949 \n",
       "  150.301,134.131 150.846,133.316 151.391,132.504 151.936,131.694 152.481,130.887 153.026,130.083 153.571,129.282 154.116,128.484 154.661,127.688 155.206,126.894 \n",
       "  155.751,126.104 156.296,125.316 156.841,124.531 157.386,123.749 157.931,122.97 158.476,122.193 159.021,121.419 159.566,120.647 160.111,119.879 160.656,119.113 \n",
       "  161.201,118.35 161.746,117.589 162.291,116.831 162.836,116.076 163.381,115.324 163.926,114.575 164.471,113.828 165.016,113.084 165.561,112.342 166.106,111.604 \n",
       "  166.651,110.868 167.196,110.134 167.741,109.404 168.286,108.676 168.832,107.951 169.377,107.229 169.922,106.509 170.467,105.792 171.012,105.078 171.557,104.367 \n",
       "  172.102,103.658 172.647,102.952 173.192,102.249 173.737,101.548 174.282,100.85 174.827,100.155 175.372,99.4628 175.917,98.7732 176.462,98.0863 177.007,97.4021 \n",
       "  177.552,96.7206 178.097,96.0419 178.642,95.3658 179.187,94.6925 179.732,94.022 180.277,93.3541 180.822,92.689 181.367,92.0266 181.912,91.3669 182.457,90.7099 \n",
       "  183.002,90.0557 183.547,89.4042 184.092,88.7554 184.637,88.1093 185.182,87.466 185.727,86.8254 186.272,86.1875 186.817,85.5523 187.362,84.9199 187.907,84.2902 \n",
       "  188.452,83.6632 188.997,83.0389 189.542,82.4173 190.087,81.7985 190.632,81.1824 191.177,80.569 191.722,79.9584 192.267,79.3504 192.812,78.7452 193.357,78.1428 \n",
       "  193.902,77.543 194.447,76.946 194.992,76.3517 195.537,75.7601 196.082,75.1712 196.627,74.5851 197.172,74.0016 197.717,73.421 198.262,72.843 198.807,72.2677 \n",
       "  199.352,71.6952 199.897,71.1254 200.442,70.5583 200.987,69.994 201.532,69.4324 202.077,68.8735 202.622,68.3173 203.167,67.7638 203.712,67.2131 204.257,66.6651 \n",
       "  204.802,66.1198 205.347,65.5773 205.892,65.0374 206.437,64.5003 206.982,63.9659 207.527,63.4342 208.072,62.9053 208.617,62.3791 209.162,61.8556 209.707,61.3348 \n",
       "  210.252,60.8168 210.797,60.3015 211.342,59.7889 211.887,59.279 212.432,58.7718 212.977,58.2674 213.522,57.7657 214.067,57.2667 214.612,56.7705 215.157,56.2769 \n",
       "  215.702,55.7861 216.247,55.298 216.792,54.8127 217.338,54.3301 217.883,53.8501 218.428,53.3729 218.973,52.8985 219.518,52.4267 220.063,51.9577 220.608,51.4914 \n",
       "  221.153,51.0279 221.698,50.567 222.243,50.1089 222.788,49.6535 223.333,49.2008 223.878,48.7509 224.423,48.3036 224.968,47.8591 225.513,47.4174 226.058,46.9783 \n",
       "  226.603,46.542 227.148,46.1084 227.693,45.6775 228.238,45.2493 228.783,44.8239 229.328,44.4012 229.873,43.9812 230.418,43.5639 230.963,43.1494 231.508,42.7375 \n",
       "  232.053,42.3284 232.598,41.9221 233.143,41.5184 233.688,41.1175 234.233,40.7193 234.778,40.3238 235.323,39.9311 235.868,39.5411 236.413,39.1537 236.958,38.7692 \n",
       "  237.503,38.3873 238.048,38.0082 238.593,37.6318 239.138,37.2581 239.683,36.8871 240.228,36.5189 240.773,36.1534 241.318,35.7906 241.863,35.4305 242.408,35.0732 \n",
       "  242.953,34.7185 243.498,34.3667 244.043,34.0175 244.588,33.671 245.133,33.3273 245.678,32.9863 246.223,32.648 246.768,32.3125 247.313,31.9797 247.858,31.6495 \n",
       "  248.403,31.3222 248.948,30.9975 249.493,30.6756 250.038,30.3564 250.583,30.0399 251.128,29.7261 251.673,29.4151 252.218,29.1068 252.763,28.8012 253.308,28.4983 \n",
       "  253.853,28.1982 254.398,27.9007 254.943,27.606 255.488,27.3141 256.033,27.0248 256.578,26.7383 257.123,26.4545 257.668,26.1734 258.213,25.8951 258.758,25.6194 \n",
       "  259.303,25.3465 259.848,25.0763 260.393,24.8089 260.938,24.5442 261.483,24.2821 262.028,24.0229 262.573,23.7663 263.118,23.5125 263.663,23.2613 264.208,23.0129 \n",
       "  264.753,22.7673 265.298,22.5243 265.843,22.2841 266.389,22.0466 266.934,21.8118 267.479,21.5798 268.024,21.3505 268.569,21.1239 269.114,20.9 269.659,20.6788 \n",
       "  270.204,20.4604 270.749,20.2447 271.294,20.0317 271.839,19.8215 272.384,19.6139 272.929,19.4091 273.474,19.207 274.019,19.0077 274.564,18.811 275.109,18.6171 \n",
       "  275.654,18.4259 276.199,18.2374 276.744,18.0517 277.289,17.8687 277.834,17.6884 278.379,17.5108 278.924,17.336 279.469,17.1638 280.014,16.9944 280.559,16.8277 \n",
       "  281.104,16.6638 281.649,16.5026 282.194,16.3441 282.739,16.1883 283.284,16.0352 283.829,15.8849 284.374,15.7373 284.919,15.5924 285.464,15.4502 286.009,15.3108 \n",
       "  286.554,15.1741 287.099,15.0401 287.644,14.9088 288.189,14.7802 288.734,14.6544 289.279,14.5313 289.824,14.411 290.369,14.2933 290.914,14.1784 291.459,14.0662 \n",
       "  292.004,13.9567 292.549,13.8499 293.094,13.7459 293.639,13.6446 294.184,13.546 294.729,13.4502 295.274,13.357 295.819,13.2666 296.364,13.1789 296.909,13.094 \n",
       "  297.454,13.0117 297.999,12.9322 298.544,12.8554 299.089,12.7813 299.634,12.71 300.179,12.6414 300.724,12.5755 301.269,12.5123 301.814,12.4518 302.359,12.3941 \n",
       "  302.904,12.3391 303.449,12.2868 303.994,12.2373 304.539,12.1904 305.084,12.1463 305.629,12.1049 306.174,12.0663 306.719,12.0303 307.264,11.9971 307.809,11.9666 \n",
       "  308.354,11.9389 308.899,11.9138 309.444,11.8915 309.989,11.8719 310.534,11.855 311.079,11.8409 311.624,11.8295 312.169,11.8208 312.714,11.8148 313.259,11.8116 \n",
       "  313.804,11.811 314.349,11.8132 314.895,11.8181 315.44,11.8258 315.985,11.8361 316.53,11.8492 317.075,11.8651 317.62,11.8836 318.165,11.9049 318.71,11.9288 \n",
       "  319.255,11.9556 319.8,11.985 320.345,12.0171 320.89,12.052 321.435,12.0896 321.98,12.13 322.525,12.173 323.07,12.2188 323.615,12.2673 324.16,12.3185 \n",
       "  324.705,12.3725 325.25,12.4291 325.795,12.4885 326.34,12.5506 326.885,12.6155 327.43,12.683 327.975,12.7533 328.52,12.8264 329.065,12.9021 329.61,12.9806 \n",
       "  330.155,13.0617 330.7,13.1456 331.245,13.2323 331.79,13.3216 332.335,13.4137 332.88,13.5085 333.425,13.606 333.97,13.7063 334.515,13.8093 335.06,13.915 \n",
       "  335.605,14.0234 336.15,14.1345 336.695,14.2484 337.24,14.365 337.785,14.4843 338.33,14.6064 338.875,14.7311 339.42,14.8586 339.965,14.9888 340.51,15.1218 \n",
       "  341.055,15.2574 341.6,15.3958 342.145,15.5369 342.69,15.6808 343.235,15.8273 343.78,15.9766 344.325,16.1286 344.87,16.2833 345.415,16.4408 345.96,16.601 \n",
       "  346.505,16.7639 347.05,16.9295 347.595,17.0978 348.14,17.2689 348.685,17.4427 349.23,17.6192 349.775,17.7984 350.32,17.9804 350.865,18.1651 351.41,18.3525 \n",
       "  351.955,18.5426 352.5,18.7355 353.045,18.9311 353.59,19.1294 354.135,19.3304 354.68,19.5342 355.225,19.7407 355.77,19.9499 356.315,20.1618 356.86,20.3764 \n",
       "  357.405,20.5938 357.95,20.8139 358.495,21.0367 359.04,21.2623 359.585,21.4906 360.13,21.7215 360.675,21.9553 361.22,22.1917 361.765,22.4309 362.31,22.6728 \n",
       "  362.855,22.9174 363.401,23.1647 363.946,23.4148 364.491,23.6675 365.036,23.9231 365.581,24.1813 366.126,24.4422 366.671,24.7059 367.216,24.9723 367.761,25.2414 \n",
       "  368.306,25.5133 368.851,25.7879 369.396,26.0652 369.941,26.3452 370.486,26.6279 371.031,26.9134 371.576,27.2016 372.121,27.4925 372.666,27.7861 373.211,28.0825 \n",
       "  373.756,28.3816 374.301,28.6834 374.846,28.9879 375.391,29.2952 375.936,29.6052 376.481,29.9179 377.026,30.2333 377.571,30.5515 378.116,30.8724 378.661,31.196 \n",
       "  379.206,31.5223 379.751,31.8513 380.296,32.1831 380.841,32.5176 381.386,32.8548 381.931,33.1948 382.476,33.5374 383.021,33.8828 383.566,34.2309 384.111,34.5818 \n",
       "  384.656,34.9353 385.201,35.2916 385.746,35.6506 386.291,36.0124 386.836,36.3768 387.381,36.744 387.926,37.1139 388.471,37.4865 389.016,37.8619 389.561,38.24 \n",
       "  390.106,38.6208 390.651,39.0043 391.196,39.3905 391.741,39.7795 392.286,40.1712 392.831,40.5656 393.376,40.9628 393.921,41.3626 394.466,41.7652 395.011,42.1706 \n",
       "  395.556,42.5786 396.101,42.9894 396.646,43.4028 397.191,43.819 397.736,44.238 398.281,44.6596 398.826,45.084 399.371,45.5111 399.916,45.941 400.461,46.3735 \n",
       "  401.006,46.8088 401.551,47.2468 402.096,47.6875 402.641,48.131 403.186,48.5771 403.731,49.026 404.276,49.4776 404.821,49.932 405.366,50.3891 405.911,50.8488 \n",
       "  406.456,51.3114 407.001,51.7766 407.546,52.2446 408.091,52.7152 408.636,53.1886 409.181,53.6648 409.726,54.1436 410.271,54.6252 410.816,55.1095 411.361,55.5966 \n",
       "  411.906,56.0863 412.452,56.5788 412.997,57.074 413.542,57.5719 414.087,58.0725 414.632,58.5759 415.177,59.082 415.722,59.5908 416.267,60.1024 416.812,60.6166 \n",
       "  417.357,61.1336 417.902,61.6533 418.447,62.1758 418.992,62.7009 419.537,63.2288 420.082,63.7594 420.627,64.2928 421.172,64.8288 421.717,65.3676 422.262,65.9091 \n",
       "  422.807,66.4533 423.352,67.0003 423.897,67.55 424.442,68.1024 424.987,68.6575 425.532,69.2153 426.077,69.7759 426.622,70.3392 427.167,70.9052 427.712,71.474 \n",
       "  428.257,72.0454 428.802,72.6196 429.347,73.1965 429.892,73.7762 430.437,74.3585 430.982,74.9436 431.527,75.5314 432.072,76.1219 432.617,76.7152 433.162,77.3112 \n",
       "  433.707,77.9099 434.252,78.5113 434.797,79.1155 435.342,79.7223 435.887,80.3319 436.432,80.9442 436.977,81.5593 437.522,82.1771 438.067,82.7976 438.612,83.4208 \n",
       "  439.157,84.0467 439.702,84.6754 440.247,85.3068 440.792,85.9409 441.337,86.5777 441.882,87.2173 442.427,87.8596 442.972,88.5046 443.517,89.1523 444.062,89.8027 \n",
       "  444.607,90.4559 445.152,91.1118 445.697,91.7705 446.242,92.4318 446.787,93.0959 447.332,93.7627 447.877,94.4322 448.422,95.1044 448.967,95.7794 449.512,96.4571 \n",
       "  450.057,97.1375 450.602,97.8207 451.147,98.5065 451.692,99.1951 452.237,99.8864 452.782,100.58 453.327,101.277 453.872,101.977 454.417,102.679 454.962,103.384 \n",
       "  455.507,104.091 456.052,104.802 456.597,105.515 457.142,106.231 457.687,106.949 458.232,107.671 458.777,108.395 459.322,109.121 459.867,109.851 460.412,110.583 \n",
       "  460.958,111.318 461.503,112.055 462.048,112.796 462.593,113.539 463.138,114.285 463.683,115.033 464.228,115.784 464.773,116.538 465.318,117.295 465.863,118.054 \n",
       "  466.408,118.817 466.953,119.581 467.498,120.349 468.043,121.119 468.588,121.892 469.133,122.668 469.678,123.447 470.223,124.228 470.768,125.012 471.313,125.798 \n",
       "  471.858,126.588 472.403,127.38 472.948,128.175 473.493,128.972 474.038,129.772 474.583,130.575 475.128,131.381 475.673,132.19 476.218,133.001 476.763,133.815 \n",
       "  477.308,134.631 477.853,135.45 478.398,136.273 478.943,137.097 479.488,137.925 480.033,138.755 480.578,139.588 481.123,140.424 481.668,141.262 482.213,142.103 \n",
       "  482.758,142.947 483.303,143.794 483.848,144.643 484.393,145.495 484.938,146.35 485.483,147.207 486.028,148.067 486.573,148.93 487.118,149.796 487.663,150.664 \n",
       "  488.208,151.535 488.753,152.409 489.298,153.286 489.843,154.165 490.388,155.047 490.933,155.932 491.478,156.819 492.023,157.709 492.568,158.602 493.113,159.498 \n",
       "  493.658,160.396 494.203,161.297 494.748,162.201 495.293,163.107 495.838,164.016 496.383,164.928 496.928,165.843 497.473,166.76 498.018,167.68 498.563,168.603 \n",
       "  499.108,169.529 499.653,170.457 500.198,171.388 500.743,172.322 501.288,173.258 501.833,174.197 502.378,175.139 502.923,176.084 503.468,177.031 504.013,177.981 \n",
       "  504.558,178.934 505.103,179.89 505.648,180.848 506.193,181.809 506.738,182.773 507.283,183.739 507.828,184.708 508.373,185.68 508.918,186.655 509.464,187.632 \n",
       "  510.009,188.612 510.554,189.595 511.099,190.58 511.644,191.568 512.189,192.559 512.734,193.553 513.279,194.549 513.824,195.548 514.369,196.55 514.914,197.555 \n",
       "  515.459,198.562 516.004,199.572 516.549,200.585 517.094,201.6 517.639,202.618 518.184,203.639 518.729,204.663 519.274,205.689 519.819,206.718 520.364,207.75 \n",
       "  520.909,208.785 521.454,209.822 521.999,210.862 522.544,211.904 523.089,212.95 523.634,213.998 524.179,215.049 524.724,216.102 525.269,217.159 525.814,218.218 \n",
       "  526.359,219.279 526.904,220.344 527.449,221.411 527.994,222.481 528.539,223.554 529.084,224.629 529.629,225.707 530.174,226.788 530.719,227.872 531.264,228.958 \n",
       "  531.809,230.047 532.354,231.138 532.899,232.233 533.444,233.33 533.989,234.43 534.534,235.533 535.079,236.638 535.624,237.746 536.169,238.857 536.714,239.97 \n",
       "  537.259,241.086 537.804,242.205 538.349,243.327 538.894,244.451 539.439,245.578 539.984,246.708 540.529,247.841 541.074,248.976 541.619,250.114 542.164,251.255 \n",
       "  542.709,252.398 543.254,253.545 543.799,254.693 544.344,255.845 544.889,256.999 545.434,258.157 545.979,259.316 546.524,260.479 547.069,261.644 547.614,262.812 \n",
       "  548.159,263.983 548.704,265.156 549.249,266.332 549.794,267.511 550.339,268.693 550.884,269.877 551.429,271.064 551.974,272.254 552.519,273.446 553.064,274.642 \n",
       "  553.609,275.84 554.154,277.04 554.699,278.244 555.244,279.45 555.789,280.659 556.334,281.87 556.879,283.084 557.424,284.301 557.97,285.521 558.515,286.744 \n",
       "  559.06,287.969 559.605,289.197 560.15,290.427 560.695,291.661 561.24,292.897 561.785,294.135 562.33,295.377 562.875,296.621 563.42,297.868 563.965,299.118 \n",
       "  564.51,300.37 565.055,301.625 565.6,302.883 566.145,304.144 566.69,305.407 567.235,306.673 567.78,307.942 568.325,309.213 568.87,310.488 569.415,311.764 \n",
       "  569.96,313.044 570.505,314.327 571.05,315.612 571.595,316.899 572.14,318.19 572.685,319.483 573.23,320.779 573.775,322.078 574.32,323.379 574.865,324.684 \n",
       "  575.41,325.99 575.955,327.3 576.5,328.612 577.045,329.927 577.59,331.245 578.135,332.566 578.68,333.889 579.225,335.215 579.77,336.544 580.315,337.875 \n",
       "  \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1502)\" style=\"stroke:#e26f46; stroke-width:3; stroke-opacity:1; fill:none\" points=\"\n",
       "  35.8488,226.923 36.3938,227.195 36.9388,227.467 37.4838,227.739 38.0288,228.011 38.5738,228.283 39.1188,228.555 39.6639,228.827 40.2089,229.099 40.7539,229.372 \n",
       "  41.2989,229.644 41.8439,229.916 42.3889,230.188 42.9339,230.46 43.4789,230.732 44.0239,231.004 44.569,231.276 45.114,231.548 45.659,231.82 46.204,232.093 \n",
       "  46.749,232.365 47.294,232.637 47.839,232.909 48.384,233.181 48.929,233.453 49.4741,233.725 50.0191,233.997 50.5641,234.269 51.1091,234.542 51.6541,234.814 \n",
       "  52.1991,235.086 52.7441,235.358 53.2891,235.63 53.8341,235.902 54.3792,236.174 54.9242,236.446 55.4692,236.718 56.0142,236.99 56.5592,237.263 57.1042,237.535 \n",
       "  57.6492,237.807 58.1942,238.079 58.7392,238.351 59.2843,238.623 59.8293,238.895 60.3743,239.167 60.9193,239.439 61.4643,239.712 62.0093,239.984 62.5543,240.256 \n",
       "  63.0993,240.528 63.6443,240.8 64.1894,241.072 64.7344,241.344 65.2794,241.616 65.8244,241.888 66.3694,242.16 66.9144,242.433 67.4594,242.705 68.0044,242.977 \n",
       "  68.5494,243.249 69.0945,243.521 69.6395,243.793 70.1845,244.065 70.7295,244.337 71.2745,244.609 71.8195,244.882 72.3645,245.154 72.9095,245.426 73.4545,245.698 \n",
       "  73.9996,245.97 74.5446,246.242 75.0896,246.514 75.6346,246.786 76.1796,247.058 76.7246,247.33 77.2696,247.603 77.8146,247.875 78.3596,248.147 78.9047,248.419 \n",
       "  79.4497,248.691 79.9947,248.963 80.5397,249.235 81.0847,249.507 81.6297,249.779 82.1747,250.052 82.7197,250.324 83.2647,250.596 83.8098,250.868 84.3548,251.14 \n",
       "  84.8998,251.412 85.4448,251.684 85.9898,251.956 86.5348,252.228 87.0798,252.501 87.6248,252.773 88.1698,253.045 88.7149,253.317 89.2599,253.589 89.8049,253.861 \n",
       "  90.3499,254.133 90.8949,254.405 91.4399,254.677 91.9849,254.949 92.5299,255.222 93.0749,255.494 93.62,255.766 94.165,256.038 94.71,256.31 95.255,256.582 \n",
       "  95.8,256.854 96.345,257.126 96.89,257.398 97.435,257.671 97.98,257.943 98.5251,258.215 99.0701,258.487 99.6151,258.759 100.16,259.031 100.705,259.303 \n",
       "  101.25,259.575 101.795,259.847 102.34,260.119 102.885,260.392 103.43,260.664 103.975,260.936 104.52,261.208 105.065,261.48 105.61,261.752 106.155,262.024 \n",
       "  106.7,262.296 107.245,262.568 107.79,262.841 108.335,263.113 108.88,263.385 109.425,263.657 109.97,263.929 110.515,264.201 111.06,264.473 111.605,264.745 \n",
       "  112.15,265.017 112.695,265.289 113.24,265.562 113.785,265.834 114.33,266.106 114.875,266.378 115.42,266.65 115.965,266.922 116.51,267.194 117.055,267.466 \n",
       "  117.6,267.738 118.145,268.011 118.69,268.283 119.235,268.555 119.78,268.827 120.326,269.099 120.871,269.371 121.416,269.643 121.961,269.915 122.506,270.187 \n",
       "  123.051,270.459 123.596,270.732 124.141,271.004 124.686,271.276 125.231,271.548 125.776,271.82 126.321,272.092 126.866,272.364 127.411,272.636 127.956,272.908 \n",
       "  128.501,273.181 129.046,273.453 129.591,273.725 130.136,273.997 130.681,274.269 131.226,274.541 131.771,274.813 132.316,275.085 132.861,275.357 133.406,275.629 \n",
       "  133.951,275.902 134.496,276.174 135.041,276.446 135.586,276.718 136.131,276.99 136.676,277.262 137.221,277.534 137.766,277.806 138.311,278.078 138.856,278.351 \n",
       "  139.401,278.623 139.946,278.895 140.491,279.167 141.036,279.439 141.581,279.711 142.126,279.983 142.671,280.255 143.216,280.527 143.761,280.799 144.306,281.072 \n",
       "  144.851,142.653 145.396,142.925 145.941,143.197 146.486,143.47 147.031,143.742 147.576,144.014 148.121,144.286 148.666,144.558 149.211,144.83 149.756,145.102 \n",
       "  150.301,145.374 150.846,145.646 151.391,145.918 151.936,146.191 152.481,146.463 153.026,146.735 153.571,147.007 154.116,147.279 154.661,147.551 155.206,147.823 \n",
       "  155.751,148.095 156.296,148.367 156.841,148.64 157.386,148.912 157.931,149.184 158.476,149.456 159.021,149.728 159.566,150 160.111,150.272 160.656,150.544 \n",
       "  161.201,150.816 161.746,151.088 162.291,151.361 162.836,151.633 163.381,151.905 163.926,152.177 164.471,152.449 165.016,152.721 165.561,152.993 166.106,153.265 \n",
       "  166.651,153.537 167.196,153.81 167.741,154.082 168.286,154.354 168.832,154.626 169.377,154.898 169.922,155.17 170.467,155.442 171.012,155.714 171.557,155.986 \n",
       "  172.102,156.258 172.647,156.531 173.192,156.803 173.737,157.075 174.282,157.347 174.827,157.619 175.372,157.891 175.917,158.163 176.462,158.435 177.007,158.707 \n",
       "  177.552,158.98 178.097,159.252 178.642,159.524 179.187,159.796 179.732,160.068 180.277,160.34 180.822,160.612 181.367,160.884 181.912,161.156 182.457,161.429 \n",
       "  183.002,161.701 183.547,161.973 184.092,162.245 184.637,162.517 185.182,162.789 185.727,163.061 186.272,163.333 186.817,163.605 187.362,163.877 187.907,164.15 \n",
       "  188.452,164.422 188.997,164.694 189.542,164.966 190.087,165.238 190.632,165.51 191.177,165.782 191.722,166.054 192.267,166.326 192.812,166.599 193.357,166.871 \n",
       "  193.902,167.143 194.447,167.415 194.992,167.687 195.537,167.959 196.082,168.231 196.627,168.503 197.172,168.775 197.717,169.047 198.262,169.32 198.807,169.592 \n",
       "  199.352,169.864 199.897,170.136 200.442,170.408 200.987,170.68 201.532,170.952 202.077,171.224 202.622,171.496 203.167,171.769 203.712,172.041 204.257,172.313 \n",
       "  204.802,172.585 205.347,172.857 205.892,173.129 206.437,173.401 206.982,173.673 207.527,173.945 208.072,174.217 208.617,174.49 209.162,174.762 209.707,175.034 \n",
       "  210.252,175.306 210.797,175.578 211.342,175.85 211.887,176.122 212.432,176.394 212.977,176.666 213.522,176.939 214.067,177.211 214.612,177.483 215.157,177.755 \n",
       "  215.702,178.027 216.247,178.299 216.792,178.571 217.338,178.843 217.883,179.115 218.428,179.387 218.973,179.66 219.518,179.932 220.063,180.204 220.608,180.476 \n",
       "  221.153,180.748 221.698,181.02 222.243,181.292 222.788,181.564 223.333,181.836 223.878,182.109 224.423,182.381 224.968,182.653 225.513,182.925 226.058,183.197 \n",
       "  226.603,183.469 227.148,183.741 227.693,184.013 228.238,184.285 228.783,184.557 229.328,184.83 229.873,185.102 230.418,185.374 230.963,185.646 231.508,185.918 \n",
       "  232.053,186.19 232.598,186.462 233.143,186.734 233.688,187.006 234.233,187.279 234.778,187.551 235.323,187.823 235.868,188.095 236.413,188.367 236.958,188.639 \n",
       "  237.503,188.911 238.048,189.183 238.593,189.455 239.138,189.727 239.683,190 240.228,190.272 240.773,190.544 241.318,190.816 241.863,191.088 242.408,191.36 \n",
       "  242.953,191.632 243.498,191.904 244.043,192.176 244.588,192.449 245.133,192.721 245.678,192.993 246.223,193.265 246.768,193.537 247.313,193.809 247.858,194.081 \n",
       "  248.403,194.353 248.948,194.625 249.493,194.897 250.038,195.17 250.583,195.442 251.128,195.714 251.673,195.986 252.218,196.258 252.763,196.53 253.308,196.802 \n",
       "  253.853,197.074 254.398,197.346 254.943,197.619 255.488,197.891 256.033,198.163 256.578,198.435 257.123,198.707 257.668,198.979 258.213,199.251 258.758,199.523 \n",
       "  259.303,199.795 259.848,200.067 260.393,200.34 260.938,200.612 261.483,200.884 262.028,201.156 262.573,201.428 263.118,201.7 263.663,201.972 264.208,202.244 \n",
       "  264.753,202.516 265.298,202.789 265.843,203.061 266.389,203.333 266.934,203.605 267.479,203.877 268.024,204.149 268.569,204.421 269.114,204.693 269.659,204.965 \n",
       "  270.204,205.237 270.749,205.51 271.294,205.782 271.839,206.054 272.384,206.326 272.929,206.598 273.474,206.87 274.019,207.142 274.564,207.414 275.109,207.686 \n",
       "  275.654,207.959 276.199,208.231 276.744,208.503 277.289,208.775 277.834,209.047 278.379,209.319 278.924,209.591 279.469,209.863 280.014,210.135 280.559,210.407 \n",
       "  281.104,210.68 281.649,210.952 282.194,211.224 282.739,211.496 283.284,211.768 283.829,212.04 284.374,212.312 284.919,212.584 285.464,212.856 286.009,213.129 \n",
       "  286.554,213.401 287.099,213.673 287.644,213.945 288.189,214.217 288.734,214.489 289.279,214.761 289.824,215.033 290.369,215.305 290.914,215.577 291.459,215.85 \n",
       "  292.004,216.122 292.549,216.394 293.094,216.666 293.639,216.938 294.184,217.21 294.729,217.482 295.274,217.754 295.819,218.026 296.364,218.299 296.909,218.571 \n",
       "  297.454,218.843 297.999,219.115 298.544,219.387 299.089,219.659 299.634,219.931 300.179,220.203 300.724,220.475 301.269,220.747 301.814,221.02 302.359,221.292 \n",
       "  302.904,221.564 303.449,221.836 303.994,222.108 304.539,222.38 305.084,222.652 305.629,222.924 306.174,223.196 306.719,223.469 307.264,223.741 307.809,224.013 \n",
       "  308.354,224.285 308.899,224.557 309.444,224.829 309.989,225.101 310.534,225.373 311.079,225.645 311.624,225.917 312.169,226.19 312.714,226.462 313.259,226.734 \n",
       "  313.804,227.006 314.349,227.278 314.895,227.55 315.44,227.822 315.985,228.094 316.53,228.366 317.075,228.639 317.62,228.911 318.165,229.183 318.71,229.455 \n",
       "  319.255,229.727 319.8,229.999 320.345,230.271 320.89,230.543 321.435,230.815 321.98,231.087 322.525,231.36 323.07,231.632 323.615,231.904 324.16,232.176 \n",
       "  324.705,232.448 325.25,232.72 325.795,232.992 326.34,233.264 326.885,233.536 327.43,233.809 327.975,234.081 328.52,234.353 329.065,234.625 329.61,234.897 \n",
       "  330.155,235.169 330.7,235.441 331.245,235.713 331.79,235.985 332.335,236.257 332.88,236.53 333.425,236.802 333.97,237.074 334.515,237.346 335.06,237.618 \n",
       "  335.605,237.89 336.15,238.162 336.695,238.434 337.24,238.706 337.785,238.979 338.33,239.251 338.875,239.523 339.42,239.795 339.965,240.067 340.51,240.339 \n",
       "  341.055,240.611 341.6,240.883 342.145,241.155 342.69,241.427 343.235,241.7 343.78,241.972 344.325,242.244 344.87,242.516 345.415,242.788 345.96,243.06 \n",
       "  346.505,243.332 347.05,243.604 347.595,243.876 348.14,244.149 348.685,244.421 349.23,244.693 349.775,244.965 350.32,245.237 350.865,245.509 351.41,245.781 \n",
       "  351.955,246.053 352.5,246.325 353.045,246.597 353.59,246.87 354.135,247.142 354.68,247.414 355.225,247.686 355.77,247.958 356.315,248.23 356.86,248.502 \n",
       "  357.405,248.774 357.95,249.046 358.495,249.319 359.04,249.591 359.585,249.863 360.13,250.135 360.675,250.407 361.22,250.679 361.765,250.951 362.31,251.223 \n",
       "  362.855,251.495 363.401,251.767 363.946,252.04 364.491,252.312 365.036,252.584 365.581,252.856 366.126,253.128 366.671,253.4 367.216,253.672 367.761,253.944 \n",
       "  368.306,254.216 368.851,254.489 369.396,254.761 369.941,255.033 370.486,255.305 371.031,255.577 371.576,255.849 372.121,256.121 372.666,256.393 373.211,256.665 \n",
       "  373.756,256.937 374.301,257.21 374.846,257.482 375.391,257.754 375.936,258.026 376.481,258.298 377.026,258.57 377.571,258.842 378.116,259.114 378.661,259.386 \n",
       "  379.206,259.659 379.751,259.931 380.296,260.203 380.841,260.475 381.386,260.747 381.931,261.019 382.476,261.291 383.021,261.563 383.566,261.835 384.111,262.107 \n",
       "  384.656,262.38 385.201,262.652 385.746,262.924 386.291,263.196 386.836,263.468 387.381,263.74 387.926,264.012 388.471,264.284 389.016,264.556 389.561,264.829 \n",
       "  390.106,265.101 390.651,265.373 391.196,265.645 391.741,265.917 392.286,266.189 392.831,266.461 393.376,266.733 393.921,267.005 394.466,267.277 395.011,267.55 \n",
       "  395.556,267.822 396.101,268.094 396.646,268.366 397.191,268.638 397.736,268.91 398.281,269.182 398.826,269.454 399.371,269.726 399.916,269.999 400.461,270.271 \n",
       "  401.006,270.543 401.551,270.815 402.096,271.087 402.641,271.359 403.186,271.631 403.731,271.903 404.276,272.175 404.821,272.447 405.366,272.72 405.911,272.992 \n",
       "  406.456,273.264 407.001,273.536 407.546,273.808 408.091,274.08 408.636,274.352 409.181,274.624 409.726,274.896 410.271,275.169 410.816,275.441 411.361,275.713 \n",
       "  411.906,275.985 412.452,276.257 412.997,276.529 413.542,276.801 414.087,277.073 414.632,277.345 415.177,277.617 415.722,277.89 416.267,278.162 416.812,278.434 \n",
       "  417.357,278.706 417.902,278.978 418.447,279.25 418.992,279.522 419.537,279.794 420.082,280.066 420.627,280.339 421.172,280.611 421.717,280.883 422.262,281.155 \n",
       "  422.807,281.427 423.352,281.699 423.897,281.971 424.442,282.243 424.987,282.515 425.532,282.787 426.077,283.06 426.622,283.332 427.167,283.604 427.712,283.876 \n",
       "  428.257,284.148 428.802,284.42 429.347,284.692 429.892,284.964 430.437,285.236 430.982,285.509 431.527,285.781 432.072,286.053 432.617,286.325 433.162,286.597 \n",
       "  433.707,286.869 434.252,287.141 434.797,287.413 435.342,287.685 435.887,287.957 436.432,288.23 436.977,288.502 437.522,288.774 438.067,289.046 438.612,289.318 \n",
       "  439.157,289.59 439.702,289.862 440.247,290.134 440.792,290.406 441.337,290.679 441.882,290.951 442.427,291.223 442.972,291.495 443.517,291.767 444.062,292.039 \n",
       "  444.607,292.311 445.152,292.583 445.697,292.855 446.242,293.127 446.787,293.4 447.332,293.672 447.877,293.944 448.422,294.216 448.967,294.488 449.512,294.76 \n",
       "  450.057,295.032 450.602,295.304 451.147,295.576 451.692,295.849 452.237,296.121 452.782,296.393 453.327,296.665 453.872,296.937 454.417,297.209 454.962,297.481 \n",
       "  455.507,297.753 456.052,298.025 456.597,298.298 457.142,298.57 457.687,298.842 458.232,299.114 458.777,299.386 459.322,299.658 459.867,299.93 460.412,300.202 \n",
       "  460.958,300.474 461.503,300.746 462.048,301.019 462.593,301.291 463.138,301.563 463.683,301.835 464.228,302.107 464.773,302.379 465.318,302.651 465.863,302.923 \n",
       "  466.408,303.195 466.953,303.468 467.498,303.74 468.043,304.012 468.588,304.284 469.133,304.556 469.678,304.828 470.223,305.1 470.768,305.372 471.313,305.644 \n",
       "  471.858,305.916 472.403,306.189 472.948,306.461 473.493,306.733 474.038,307.005 474.583,307.277 475.128,307.549 475.673,307.821 476.218,308.093 476.763,308.365 \n",
       "  477.308,308.638 477.853,308.91 478.398,309.182 478.943,309.454 479.488,309.726 480.033,309.998 480.578,310.27 481.123,310.542 481.668,310.814 482.213,311.086 \n",
       "  482.758,311.359 483.303,311.631 483.848,311.903 484.393,312.175 484.938,312.447 485.483,312.719 486.028,312.991 486.573,313.263 487.118,313.535 487.663,313.808 \n",
       "  488.208,314.08 488.753,314.352 489.298,314.624 489.843,314.896 490.388,315.168 490.933,315.44 491.478,315.712 492.023,315.984 492.568,316.256 493.113,316.529 \n",
       "  493.658,316.801 494.203,317.073 494.748,317.345 495.293,317.617 495.838,317.889 496.383,318.161 496.928,318.433 497.473,318.705 498.018,318.978 498.563,319.25 \n",
       "  499.108,319.522 499.653,319.794 500.198,320.066 500.743,320.338 501.288,320.61 501.833,320.882 502.378,321.154 502.923,321.426 503.468,321.699 504.013,321.971 \n",
       "  504.558,322.243 505.103,322.515 505.648,322.787 506.193,323.059 506.738,323.331 507.283,323.603 507.828,323.875 508.373,324.148 508.918,324.42 509.464,324.692 \n",
       "  510.009,324.964 510.554,325.236 511.099,325.508 511.644,325.78 512.189,326.052 512.734,326.324 513.279,326.596 513.824,326.869 514.369,327.141 514.914,327.413 \n",
       "  515.459,327.685 516.004,327.957 516.549,328.229 517.094,328.501 517.639,328.773 518.184,329.045 518.729,329.318 519.274,329.59 519.819,329.862 520.364,330.134 \n",
       "  520.909,330.406 521.454,330.678 521.999,330.95 522.544,331.222 523.089,331.494 523.634,331.766 524.179,332.039 524.724,332.311 525.269,332.583 525.814,332.855 \n",
       "  526.359,333.127 526.904,333.399 527.449,333.671 527.994,333.943 528.539,334.215 529.084,334.488 529.629,334.76 530.174,335.032 530.719,335.304 531.264,335.576 \n",
       "  531.809,335.848 532.354,336.12 532.899,336.392 533.444,336.664 533.989,336.936 534.534,337.209 535.079,337.481 535.624,337.753 536.169,338.025 536.714,338.297 \n",
       "  537.259,338.569 537.804,338.841 538.349,339.113 538.894,339.385 539.439,339.658 539.984,339.93 540.529,340.202 541.074,340.474 541.619,340.746 542.164,341.018 \n",
       "  542.709,341.29 543.254,341.562 543.799,341.834 544.344,342.106 544.889,342.379 545.434,342.651 545.979,342.923 546.524,343.195 547.069,343.467 547.614,343.739 \n",
       "  548.159,344.011 548.704,344.283 549.249,344.555 549.794,344.828 550.339,345.1 550.884,345.372 551.429,345.644 551.974,345.916 552.519,346.188 553.064,346.46 \n",
       "  553.609,346.732 554.154,347.004 554.699,347.276 555.244,347.549 555.789,347.821 556.334,348.093 556.879,348.365 557.424,348.637 557.97,348.909 558.515,349.181 \n",
       "  559.06,349.453 559.605,349.725 560.15,349.998 560.695,350.27 561.24,350.542 561.785,350.814 562.33,351.086 562.875,351.358 563.42,351.63 563.965,351.902 \n",
       "  564.51,352.174 565.055,352.446 565.6,352.719 566.145,352.991 566.69,353.263 567.235,353.535 567.78,353.807 568.325,354.079 568.87,354.351 569.415,354.623 \n",
       "  569.96,354.895 570.505,355.168 571.05,355.44 571.595,355.712 572.14,355.984 572.685,356.256 573.23,356.528 573.775,356.8 574.32,357.072 574.865,357.344 \n",
       "  575.41,357.616 575.955,357.889 576.5,358.161 577.045,358.433 577.59,358.705 578.135,358.977 578.68,359.249 579.225,359.521 579.77,359.793 580.315,360.065 \n",
       "  \n",
       "  \"/>\n",
       "<polygon clip-path=\"url(#clip1500)\" points=\"\n",
       "485.201,78.051 562.315,78.051 562.315,32.691 485.201,32.691 \n",
       "  \" fill=\"#ffffff\" fill-opacity=\"1\"/>\n",
       "<polyline clip-path=\"url(#clip1500)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  485.201,78.051 562.315,78.051 562.315,32.691 485.201,32.691 485.201,78.051 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1500)\" style=\"stroke:#009af9; stroke-width:3; stroke-opacity:1; fill:none\" points=\"\n",
       "  491.201,47.811 527.201,47.811 \n",
       "  \"/>\n",
       "<g clip-path=\"url(#clip1500)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:start;\" transform=\"rotate(0, 533.201, 52.311)\" x=\"533.201\" y=\"52.311\">y(t)</text>\n",
       "</g>\n",
       "<polyline clip-path=\"url(#clip1500)\" style=\"stroke:#e26f46; stroke-width:3; stroke-opacity:1; fill:none\" points=\"\n",
       "  491.201,62.931 527.201,62.931 \n",
       "  \"/>\n",
       "<g clip-path=\"url(#clip1500)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:start;\" transform=\"rotate(0, 533.201, 67.431)\" x=\"533.201\" y=\"67.431\">v(t)</text>\n",
       "</g>\n",
       "</svg>\n"
      ]
     },
     "execution_count": 46,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sol = solve(prob,Tsit5(),tstops=[2.0])\n",
    "plot(sol)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Note that this example could've been done with a `ContinuousCallback` by checking the condition `t-2`."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Merging Callbacks with Callback Sets\n",
    "\n",
    "In some cases you may want to merge callbacks to build up more complex behavior. In our previous result, notice that the model is unphysical because the ball goes below zero! What we really need to do is add the bounce callback together with the kick. This can be achieved through the `CallbackSet`."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "DiffEqBase.CallbackSet{Tuple{DiffEqBase.ContinuousCallback{#condition,#affect!,#affect!,DiffEqBase.#INITIALIZE_DEFAULT,Float64,Int64,Void}},Tuple{DiffEqBase.DiscreteCallback{#condition_kick,#affect_kick!,DiffEqBase.#INITIALIZE_DEFAULT}}}((DiffEqBase.ContinuousCallback{#condition,#affect!,#affect!,DiffEqBase.#INITIALIZE_DEFAULT,Float64,Int64,Void}(condition, affect!, affect!, DiffEqBase.INITIALIZE_DEFAULT, nothing, true, 10, (true, true), 1.0e-9, 0),), (DiffEqBase.DiscreteCallback{#condition_kick,#affect_kick!,DiffEqBase.#INITIALIZE_DEFAULT}(condition_kick, affect_kick!, DiffEqBase.INITIALIZE_DEFAULT, (true, true)),))"
      ]
     },
     "execution_count": 47,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cb = CallbackSet(bounce_cb,kick_cb)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "A `CallbackSet` merges their behavior together. The logic is as follows. In a given interval, if there are multiple continuous callbacks that would trigger, only the one that triggers at the earliest time is used. The time is pulled back to where that continuous callback is triggered, and then the `DiscreteCallback`s in the callback set are called in order."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n",
       "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"600\" height=\"400\" viewBox=\"0 0 600 400\">\n",
       "<defs>\n",
       "  <clipPath id=\"clip1900\">\n",
       "    <rect x=\"0\" y=\"0\" width=\"600\" height=\"400\"/>\n",
       "  </clipPath>\n",
       "</defs>\n",
       "<polygon clip-path=\"url(#clip1900)\" points=\"\n",
       "0,400 600,400 600,0 0,0 \n",
       "  \" fill=\"#ffffff\" fill-opacity=\"1\"/>\n",
       "<defs>\n",
       "  <clipPath id=\"clip1901\">\n",
       "    <rect x=\"120\" y=\"0\" width=\"421\" height=\"400\"/>\n",
       "  </clipPath>\n",
       "</defs>\n",
       "<polygon clip-path=\"url(#clip1900)\" points=\"\n",
       "35.8488,360.065 580.315,360.065 580.315,11.811 35.8488,11.811 \n",
       "  \" fill=\"#ffffff\" fill-opacity=\"1\"/>\n",
       "<defs>\n",
       "  <clipPath id=\"clip1902\">\n",
       "    <rect x=\"35\" y=\"11\" width=\"545\" height=\"349\"/>\n",
       "  </clipPath>\n",
       "</defs>\n",
       "<polyline clip-path=\"url(#clip1902)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  35.8488,360.065 35.8488,11.811 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1902)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  217.338,360.065 217.338,11.811 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1902)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  398.826,360.065 398.826,11.811 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1902)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  580.315,360.065 580.315,11.811 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1902)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  35.8488,303.602 580.315,303.602 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1902)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  35.8488,243.778 580.315,243.778 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1902)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  35.8488,183.955 580.315,183.955 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1902)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  35.8488,124.132 580.315,124.132 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1902)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  35.8488,64.3088 580.315,64.3088 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1900)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  35.8488,360.065 580.315,360.065 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1900)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  35.8488,360.065 35.8488,11.811 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1900)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  35.8488,360.065 35.8488,354.842 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1900)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  217.338,360.065 217.338,354.842 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1900)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  398.826,360.065 398.826,354.842 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1900)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  580.315,360.065 580.315,354.842 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1900)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  35.8488,303.602 44.0158,303.602 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1900)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  35.8488,243.778 44.0158,243.778 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1900)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  35.8488,183.955 44.0158,183.955 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1900)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  35.8488,124.132 44.0158,124.132 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1900)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  35.8488,64.3088 44.0158,64.3088 \n",
       "  \"/>\n",
       "<g clip-path=\"url(#clip1900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 35.8488, 373.865)\" x=\"35.8488\" y=\"373.865\">0</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip1900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 217.338, 373.865)\" x=\"217.338\" y=\"373.865\">5</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip1900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 398.826, 373.865)\" x=\"398.826\" y=\"373.865\">10</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip1900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 580.315, 373.865)\" x=\"580.315\" y=\"373.865\">15</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip1900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:end;\" transform=\"rotate(0, 29.8488, 308.102)\" x=\"29.8488\" y=\"308.102\">-20</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip1900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:end;\" transform=\"rotate(0, 29.8488, 248.278)\" x=\"29.8488\" y=\"248.278\">0</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip1900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:end;\" transform=\"rotate(0, 29.8488, 188.455)\" x=\"29.8488\" y=\"188.455\">20</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip1900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:end;\" transform=\"rotate(0, 29.8488, 128.632)\" x=\"29.8488\" y=\"128.632\">40</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip1900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:end;\" transform=\"rotate(0, 29.8488, 68.8088)\" x=\"29.8488\" y=\"68.8088\">60</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip1900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:16; text-anchor:middle;\" transform=\"rotate(0, 308.082, 397.6)\" x=\"308.082\" y=\"397.6\">t</text>\n",
       "</g>\n",
       "<polyline clip-path=\"url(#clip1902)\" style=\"stroke:#009af9; stroke-width:3; stroke-opacity:1; fill:none\" points=\"\n",
       "  35.8488,94.2204 36.3938,94.2237 36.9388,94.2336 37.4838,94.2502 38.0288,94.2733 38.5738,94.303 39.1188,94.3394 39.6639,94.3823 40.2089,94.4319 40.7539,94.4881 \n",
       "  41.2989,94.5508 41.8439,94.6202 42.3889,94.6962 42.9339,94.7788 43.4789,94.8681 44.0239,94.9639 44.569,95.0663 45.114,95.1754 45.659,95.291 46.204,95.4133 \n",
       "  46.749,95.5422 47.294,95.6776 47.839,95.8197 48.384,95.9684 48.929,96.1237 49.4741,96.2856 50.0191,96.4542 50.5641,96.6293 51.1091,96.811 51.6541,96.9994 \n",
       "  52.1991,97.1943 52.7441,97.3959 53.2891,97.6041 53.8341,97.8189 54.3792,98.0403 54.9242,98.2683 55.4692,98.5029 56.0142,98.7441 56.5592,98.9919 57.1042,99.2463 \n",
       "  57.6492,99.5074 58.1942,99.775 58.7392,100.049 59.2843,100.33 59.8293,100.618 60.3743,100.912 60.9193,101.212 61.4643,101.52 62.0093,101.834 62.5543,102.154 \n",
       "  63.0993,102.481 63.6443,102.815 64.1894,103.155 64.7344,103.502 65.2794,103.856 65.8244,104.216 66.3694,104.583 66.9144,104.956 67.4594,105.336 68.0044,105.723 \n",
       "  68.5494,106.116 69.0945,106.516 69.6395,106.922 70.1845,107.335 70.7295,107.755 71.2745,108.181 71.8195,108.614 72.3645,109.054 72.9095,109.5 73.4545,109.952 \n",
       "  73.9996,110.412 74.5446,110.878 75.0896,111.35 75.6346,111.829 76.1796,112.315 76.7246,112.807 77.2696,113.306 77.8146,113.812 78.3596,114.324 78.9047,114.843 \n",
       "  79.4497,115.368 79.9947,115.9 80.5397,116.439 81.0847,116.984 81.6297,117.536 82.1747,118.094 82.7197,118.659 83.2647,119.231 83.8098,119.809 84.3548,120.394 \n",
       "  84.8998,120.986 85.4448,121.584 85.9898,122.189 86.5348,122.8 87.0798,123.418 87.6248,124.042 88.1698,124.673 88.7149,125.311 89.2599,125.955 89.8049,126.606 \n",
       "  90.3499,127.264 90.8949,127.928 91.4399,128.599 91.9849,129.276 92.5299,129.96 93.0749,130.651 93.62,131.348 94.165,132.052 94.71,132.762 95.255,133.48 \n",
       "  95.8,134.203 96.345,134.933 96.89,135.67 97.435,136.414 97.98,137.164 98.5251,137.921 99.0701,138.684 99.6151,139.454 100.16,140.23 100.705,141.013 \n",
       "  101.25,141.803 101.795,142.6 102.34,143.403 102.885,144.212 103.43,145.028 103.975,145.851 104.52,146.68 105.065,147.516 105.61,148.359 106.155,149.208 \n",
       "  106.7,150.064 107.245,150.927 107.79,151.796 108.335,152.671 108.88,151.757 109.425,150.4 109.97,149.05 110.515,147.707 111.06,146.37 111.605,145.039 \n",
       "  112.15,143.716 112.695,142.399 113.24,141.088 113.785,139.784 114.33,138.487 114.875,137.196 115.42,135.912 115.965,134.635 116.51,133.364 117.055,132.1 \n",
       "  117.6,130.842 118.145,129.591 118.69,128.347 119.235,127.109 119.78,125.878 120.326,124.653 120.871,123.435 121.416,122.224 121.961,121.019 122.506,119.821 \n",
       "  123.051,118.63 123.596,117.445 124.141,116.266 124.686,115.095 125.231,113.93 125.776,112.771 126.321,111.619 126.866,110.474 127.411,109.335 127.956,108.203 \n",
       "  128.501,107.078 129.046,105.959 129.591,104.847 130.136,103.741 130.681,102.642 131.226,101.55 131.771,100.464 132.316,99.3847 132.861,98.3122 133.406,97.2462 \n",
       "  133.951,96.1868 134.496,95.1341 135.041,94.088 135.586,93.0484 136.131,92.0155 136.676,90.9892 137.221,89.9695 137.766,88.9564 138.311,87.9499 138.856,86.9501 \n",
       "  139.401,85.9568 139.946,84.9702 140.491,83.9901 141.036,83.0167 141.581,82.0498 142.126,81.0896 142.671,80.136 143.216,79.189 143.761,78.2486 144.306,77.3148 \n",
       "  144.851,76.3877 145.396,75.4671 145.941,74.5531 146.486,73.6458 147.031,72.745 147.576,71.8509 148.121,70.9634 148.666,70.0825 149.211,69.2082 149.756,68.3405 \n",
       "  150.301,67.4794 150.846,66.6249 151.391,65.777 151.936,64.9358 152.481,64.1011 153.026,63.2731 153.571,62.4516 154.116,61.6368 154.661,60.8286 155.206,60.027 \n",
       "  155.751,59.232 156.296,58.4436 156.841,57.6618 157.386,56.8866 157.931,56.118 158.476,55.3561 159.021,54.6007 159.566,53.852 160.111,53.1099 160.656,52.3743 \n",
       "  161.201,51.6454 161.746,50.9231 162.291,50.2074 162.836,49.4983 163.381,48.7958 163.926,48.1 164.471,47.4107 165.016,46.7281 165.561,46.052 166.106,45.3826 \n",
       "  166.651,44.7198 167.196,44.0635 167.741,43.4139 168.286,42.7709 168.832,42.1345 169.377,41.5047 169.922,40.8816 170.467,40.265 171.012,39.655 171.557,39.0517 \n",
       "  172.102,38.455 172.647,37.8648 173.192,37.2813 173.737,36.7044 174.282,36.1341 174.827,35.5704 175.372,35.0133 175.917,34.4628 176.462,33.9189 177.007,33.3817 \n",
       "  177.552,32.851 178.097,32.327 178.642,31.8095 179.187,31.2987 179.732,30.7945 180.277,30.2969 180.822,29.8059 181.367,29.3215 181.912,28.8437 182.457,28.3725 \n",
       "  183.002,27.908 183.547,27.45 184.092,26.9987 184.637,26.5539 185.182,26.1158 185.727,25.6843 186.272,25.2594 186.817,24.8411 187.362,24.4294 187.907,24.0243 \n",
       "  188.452,23.6258 188.997,23.2339 189.542,22.8487 190.087,22.47 190.632,22.098 191.177,21.7325 191.722,21.3737 192.267,21.0215 192.812,20.6759 193.357,20.3369 \n",
       "  193.902,20.0045 194.447,19.6787 194.992,19.3595 195.537,19.047 196.082,18.741 196.627,18.4417 197.172,18.1489 197.717,17.8628 198.262,17.5833 198.807,17.3104 \n",
       "  199.352,17.0441 199.897,16.7844 200.442,16.5313 200.987,16.2848 201.532,16.0449 202.077,15.8117 202.622,15.585 203.167,15.365 203.712,15.1515 204.257,14.9447 \n",
       "  204.802,14.7445 205.347,14.5509 205.892,14.3639 206.437,14.1835 206.982,14.0097 207.527,13.8425 208.072,13.682 208.617,13.528 209.162,13.3807 209.707,13.2399 \n",
       "  210.252,13.1058 210.797,12.9783 211.342,12.8574 211.887,12.7431 212.432,12.6354 212.977,12.5343 213.522,12.4398 214.067,12.3519 214.612,12.2707 215.157,12.196 \n",
       "  215.702,12.128 216.247,12.0665 216.792,12.0117 217.338,11.9635 217.883,11.9219 218.428,11.8869 218.973,11.8585 219.518,11.8367 220.063,11.8215 220.608,11.813 \n",
       "  221.153,11.811 221.698,11.8157 222.243,11.8269 222.788,11.8448 223.333,11.8693 223.878,11.9004 224.423,11.9381 224.968,11.9824 225.513,12.0333 226.058,12.0908 \n",
       "  226.603,12.1549 227.148,12.2257 227.693,12.303 228.238,12.387 228.783,12.4776 229.328,12.5747 229.873,12.6785 230.418,12.7889 230.963,12.9059 231.508,13.0295 \n",
       "  232.053,13.1597 232.598,13.2966 233.143,13.44 233.688,13.5901 234.233,13.7467 234.778,13.91 235.323,14.0798 235.868,14.2563 236.413,14.4394 236.958,14.6291 \n",
       "  237.503,14.8254 238.048,15.0283 238.593,15.2378 239.138,15.454 239.683,15.6767 240.228,15.9061 240.773,16.142 241.318,16.3846 241.863,16.6338 242.408,16.8896 \n",
       "  242.953,17.1519 243.498,17.421 244.043,17.6966 244.588,17.9788 245.133,18.2676 245.678,18.563 246.223,18.8651 246.768,19.1737 247.313,19.489 247.858,19.8109 \n",
       "  248.403,20.1394 248.948,20.4744 249.493,20.8161 250.038,21.1645 250.583,21.5194 251.128,21.8809 251.673,22.249 252.218,22.6238 252.763,23.0051 253.308,23.3931 \n",
       "  253.853,23.7876 254.398,24.1888 254.943,24.5966 255.488,25.011 256.033,25.432 256.578,25.8596 257.123,26.2938 257.668,26.7347 258.213,27.1821 258.758,27.6361 \n",
       "  259.303,28.0968 259.848,28.5641 260.393,29.0379 260.938,29.5184 261.483,30.0055 262.028,30.4992 262.573,30.9995 263.118,31.5064 263.663,32.0199 264.208,32.5401 \n",
       "  264.753,33.0668 265.298,33.6002 265.843,34.1401 266.389,34.6867 266.934,35.2399 267.479,35.7997 268.024,36.3661 268.569,36.9391 269.114,37.5187 269.659,38.1049 \n",
       "  270.204,38.6977 270.749,39.2972 271.294,39.9032 271.839,40.5159 272.384,41.1351 272.929,41.761 273.474,42.3935 274.019,43.0326 274.564,43.6783 275.109,44.3306 \n",
       "  275.654,44.9895 276.199,45.655 276.744,46.3272 277.289,47.0059 277.834,47.6912 278.379,48.3832 278.924,49.0818 279.469,49.787 280.014,50.4987 280.559,51.2171 \n",
       "  281.104,51.9421 281.649,52.6737 282.194,53.412 282.739,54.1568 283.284,54.9082 283.829,55.6663 284.374,56.4309 284.919,57.2022 285.464,57.9801 286.009,58.7646 \n",
       "  286.554,59.5557 287.099,60.3534 287.644,61.1577 288.189,61.9686 288.734,62.7861 289.279,63.6102 289.824,64.441 290.369,65.2783 290.914,66.1223 291.459,66.9729 \n",
       "  292.004,67.83 292.549,68.6938 293.094,69.5642 293.639,70.4412 294.184,71.3248 294.729,72.2151 295.274,73.1119 295.819,74.0153 296.364,74.9254 296.909,75.842 \n",
       "  297.454,76.7653 297.999,77.6952 298.544,78.6317 299.089,79.5747 299.634,80.5244 300.179,81.4808 300.724,82.4437 301.269,83.4132 301.814,84.3893 302.359,85.3721 \n",
       "  302.904,86.3614 303.449,87.3574 303.994,88.36 304.539,89.3691 305.084,90.3849 305.629,91.4073 306.174,92.4363 306.719,93.4719 307.264,94.5142 307.809,95.563 \n",
       "  308.354,96.6184 308.899,97.6805 309.444,98.7491 309.989,99.8244 310.534,100.906 311.079,101.995 311.624,103.09 312.169,104.192 312.714,105.3 313.259,106.415 \n",
       "  313.804,107.536 314.349,108.664 314.895,109.799 315.44,110.941 315.985,112.089 316.53,113.243 317.075,114.404 317.62,115.572 318.165,116.746 318.71,117.927 \n",
       "  319.255,119.115 319.8,120.309 320.345,121.51 320.89,122.718 321.435,123.932 321.98,125.152 322.525,126.38 323.07,127.613 323.615,128.854 324.16,130.101 \n",
       "  324.705,131.355 325.25,132.615 325.795,133.882 326.34,135.155 326.885,136.436 327.43,137.722 327.975,139.016 328.52,140.316 329.065,141.622 329.61,142.935 \n",
       "  330.155,144.255 330.7,145.582 331.245,146.915 331.79,148.254 332.335,149.6 332.88,150.953 333.425,152.313 333.97,153.679 334.515,155.051 335.06,156.431 \n",
       "  335.605,157.817 336.15,159.209 336.695,160.608 337.24,162.014 337.785,163.426 338.33,164.845 338.875,166.271 339.42,167.703 339.965,169.141 340.51,170.587 \n",
       "  341.055,172.039 341.6,173.497 342.145,174.963 342.69,176.434 343.235,177.913 343.78,179.398 344.325,180.889 344.87,182.388 345.415,183.892 345.96,185.404 \n",
       "  346.505,186.922 347.05,188.447 347.595,189.978 348.14,191.516 348.685,193.06 349.23,194.611 349.775,196.169 350.32,197.733 350.865,199.304 351.41,200.882 \n",
       "  351.955,202.466 352.5,204.057 353.045,205.654 353.59,207.258 354.135,208.868 354.68,210.486 355.225,212.109 355.77,213.74 356.315,215.377 356.86,217.02 \n",
       "  357.405,218.671 357.95,220.328 358.495,221.991 359.04,223.661 359.585,225.338 360.13,227.021 360.675,228.711 361.22,230.407 361.765,232.11 362.31,233.82 \n",
       "  362.855,235.536 363.401,237.259 363.946,238.989 364.491,240.725 365.036,242.468 365.581,243.384 366.126,241.813 366.671,240.249 367.216,238.691 367.761,237.14 \n",
       "  368.306,235.595 368.851,234.057 369.396,232.526 369.941,231.002 370.486,229.483 371.031,227.972 371.576,226.467 372.121,224.969 372.666,223.477 373.211,221.992 \n",
       "  373.756,220.514 374.301,219.042 374.846,217.577 375.391,216.118 375.936,214.666 376.481,213.221 377.026,211.782 377.571,210.35 378.116,208.924 378.661,207.505 \n",
       "  379.206,206.093 379.751,204.687 380.296,203.288 380.841,201.896 381.386,200.51 381.931,199.13 382.476,197.758 383.021,196.392 383.566,195.032 384.111,193.679 \n",
       "  384.656,192.333 385.201,190.994 385.746,189.66 386.291,188.334 386.836,187.014 387.381,185.701 387.926,184.394 388.471,183.094 389.016,181.801 389.561,180.514 \n",
       "  390.106,179.234 390.651,177.961 391.196,176.694 391.741,175.433 392.286,174.18 392.831,172.932 393.376,171.692 393.921,170.458 394.466,169.231 395.011,168.01 \n",
       "  395.556,166.796 396.101,165.589 396.646,164.388 397.191,163.193 397.736,162.006 398.281,160.825 398.826,159.65 399.371,158.483 399.916,157.321 400.461,156.167 \n",
       "  401.006,155.019 401.551,153.877 402.096,152.743 402.641,151.614 403.186,150.493 403.731,149.378 404.276,148.27 404.821,147.168 405.366,146.073 405.911,144.984 \n",
       "  406.456,143.902 407.001,142.827 407.546,141.758 408.091,140.696 408.636,139.641 409.181,138.592 409.726,137.55 410.271,136.514 410.816,135.485 411.361,134.463 \n",
       "  411.906,133.447 412.452,132.438 412.997,131.435 413.542,130.439 414.087,129.45 414.632,128.467 415.177,127.491 415.722,126.521 416.267,125.558 416.812,124.602 \n",
       "  417.357,123.652 417.902,122.709 418.447,121.773 418.992,120.843 419.537,119.919 420.082,119.003 420.627,118.093 421.172,117.189 421.717,116.292 422.262,115.402 \n",
       "  422.807,114.518 423.352,113.641 423.897,112.771 424.442,111.907 424.987,111.05 425.532,110.199 426.077,109.355 426.622,108.518 427.167,107.687 427.712,106.863 \n",
       "  428.257,106.046 428.802,105.235 429.347,104.43 429.892,103.633 430.437,102.841 430.982,102.057 431.527,101.279 432.072,100.508 432.617,99.743 433.162,98.985 \n",
       "  433.707,98.2335 434.252,97.4886 434.797,96.7504 435.342,96.0188 435.887,95.2937 436.432,94.5753 436.977,93.8635 437.522,93.1583 438.067,92.4597 438.612,91.7677 \n",
       "  439.157,91.0823 439.702,90.4036 440.247,89.7314 440.792,89.0659 441.337,88.4069 441.882,87.7546 442.427,87.1089 442.972,86.4697 443.517,85.8372 444.062,85.2113 \n",
       "  444.607,84.5921 445.152,83.9794 445.697,83.3733 446.242,82.7738 446.787,82.181 447.332,81.5947 447.877,81.0151 448.422,80.4421 448.967,79.8757 449.512,79.3158 \n",
       "  450.057,78.7626 450.602,78.216 451.147,77.6761 451.692,77.1427 452.237,76.6159 452.782,76.0958 453.327,75.5822 453.872,75.0753 454.417,74.5749 454.962,74.0812 \n",
       "  455.507,73.5941 456.052,73.1136 456.597,72.6397 457.142,72.1724 457.687,71.7117 458.232,71.2577 458.777,70.8102 459.322,70.3693 459.867,69.9351 460.412,69.5075 \n",
       "  460.958,69.0864 461.503,68.672 462.048,68.2642 462.593,67.863 463.138,67.4684 463.683,67.0804 464.228,66.699 464.773,66.3243 465.318,65.9561 465.863,65.5946 \n",
       "  466.408,65.2396 466.953,64.8913 467.498,64.5496 468.043,64.2145 468.588,63.886 469.133,63.5641 469.678,63.2488 470.223,62.9401 470.768,62.638 471.313,62.3426 \n",
       "  471.858,62.0537 472.403,61.7715 472.948,61.4958 473.493,61.2268 474.038,60.9644 474.583,60.7086 475.128,60.4594 475.673,60.2168 476.218,59.9808 476.763,59.7514 \n",
       "  477.308,59.5287 477.853,59.3125 478.398,59.1029 478.943,58.9 479.488,58.7037 480.033,58.514 480.578,58.3308 481.123,58.1543 481.668,57.9844 482.213,57.8212 \n",
       "  482.758,57.6645 483.303,57.5144 483.848,57.3709 484.393,57.2341 484.938,57.1038 485.483,56.9802 486.028,56.8632 486.573,56.7528 487.118,56.649 487.663,56.5518 \n",
       "  488.208,56.4612 488.753,56.3772 489.298,56.2998 489.843,56.229 490.388,56.1649 490.933,56.1073 491.478,56.0564 492.023,56.0121 492.568,55.9743 493.113,55.9432 \n",
       "  493.658,55.9187 494.203,55.9008 494.748,55.8895 495.293,55.8849 495.838,55.8868 496.383,55.8953 496.928,55.9105 497.473,55.9322 498.018,55.9606 498.563,55.9956 \n",
       "  499.108,56.0372 499.653,56.0854 500.198,56.1402 500.743,56.2016 501.288,56.2696 501.833,56.3442 502.378,56.4254 502.923,56.5133 503.468,56.6077 504.013,56.7088 \n",
       "  504.558,56.8165 505.103,56.9307 505.648,57.0516 506.193,57.1791 506.738,57.3132 507.283,57.4539 507.828,57.6013 508.373,57.7552 508.918,57.9157 509.464,58.0829 \n",
       "  510.009,58.2566 510.554,58.437 511.099,58.624 511.644,58.8176 512.189,59.0178 512.734,59.2246 513.279,59.438 513.824,59.658 514.369,59.8846 514.914,60.1179 \n",
       "  515.459,60.3577 516.004,60.6041 516.549,60.8572 517.094,61.1169 517.639,61.3832 518.184,61.656 518.729,61.9355 519.274,62.2217 519.819,62.5144 520.364,62.8137 \n",
       "  520.909,63.1196 521.454,63.4322 521.999,63.7513 522.544,64.0771 523.089,64.4094 523.634,64.7484 524.179,65.094 524.724,65.4462 525.269,65.805 525.814,66.1704 \n",
       "  526.359,66.5424 526.904,66.921 527.449,67.3063 527.994,67.6981 528.539,68.0966 529.084,68.5016 529.629,68.9133 530.174,69.3316 530.719,69.7565 531.264,70.188 \n",
       "  531.809,70.6261 532.354,71.0708 532.899,71.5221 533.444,71.9801 533.989,72.4446 534.534,72.9157 535.079,73.3935 535.624,73.8779 536.169,74.3688 536.714,74.8664 \n",
       "  537.259,75.3706 537.804,75.8814 538.349,76.3988 538.894,76.9229 539.439,77.4535 539.984,77.9907 540.529,78.5346 541.074,79.085 541.619,79.6421 542.164,80.2057 \n",
       "  542.709,80.776 543.254,81.3529 543.799,81.9364 544.344,82.5265 544.889,83.1232 545.434,83.7266 545.979,84.3365 546.524,84.953 547.069,85.5762 547.614,86.2059 \n",
       "  548.159,86.8423 548.704,87.4853 549.249,88.1349 549.794,88.7911 550.339,89.4539 550.884,90.1233 551.429,90.7993 551.974,91.4819 552.519,92.1712 553.064,92.867 \n",
       "  553.609,93.5695 554.154,94.2785 554.699,94.9942 555.244,95.7165 555.789,96.4454 556.334,97.1809 556.879,97.923 557.424,98.6717 557.97,99.427 558.515,100.189 \n",
       "  559.06,100.957 559.605,101.733 560.15,102.514 560.695,103.303 561.24,104.098 561.785,104.899 562.33,105.708 562.875,106.522 563.42,107.344 563.965,108.172 \n",
       "  564.51,109.006 565.055,109.848 565.6,110.695 566.145,111.55 566.69,112.411 567.235,113.279 567.78,114.153 568.325,115.034 568.87,115.921 569.415,116.815 \n",
       "  569.96,117.716 570.505,118.623 571.05,119.537 571.595,120.458 572.14,121.385 572.685,122.319 573.23,123.259 573.775,124.206 574.32,125.16 574.865,126.12 \n",
       "  575.41,127.087 575.955,128.06 576.5,129.04 577.045,130.027 577.59,131.02 578.135,132.02 578.68,133.026 579.225,134.039 579.77,135.059 580.315,136.085 \n",
       "  \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1902)\" style=\"stroke:#e26f46; stroke-width:3; stroke-opacity:1; fill:none\" points=\"\n",
       "  35.8488,243.778 36.3938,244.219 36.9388,244.659 37.4838,245.099 38.0288,245.539 38.5738,245.979 39.1188,246.419 39.6639,246.859 40.2089,247.3 40.7539,247.74 \n",
       "  41.2989,248.18 41.8439,248.62 42.3889,249.06 42.9339,249.5 43.4789,249.94 44.0239,250.381 44.569,250.821 45.114,251.261 45.659,251.701 46.204,252.141 \n",
       "  46.749,252.581 47.294,253.021 47.839,253.462 48.384,253.902 48.929,254.342 49.4741,254.782 50.0191,255.222 50.5641,255.662 51.1091,256.102 51.6541,256.543 \n",
       "  52.1991,256.983 52.7441,257.423 53.2891,257.863 53.8341,258.303 54.3792,258.743 54.9242,259.183 55.4692,259.624 56.0142,260.064 56.5592,260.504 57.1042,260.944 \n",
       "  57.6492,261.384 58.1942,261.824 58.7392,262.264 59.2843,262.704 59.8293,263.145 60.3743,263.585 60.9193,264.025 61.4643,264.465 62.0093,264.905 62.5543,265.345 \n",
       "  63.0993,265.785 63.6443,266.226 64.1894,266.666 64.7344,267.106 65.2794,267.546 65.8244,267.986 66.3694,268.426 66.9144,268.866 67.4594,269.307 68.0044,269.747 \n",
       "  68.5494,270.187 69.0945,270.627 69.6395,271.067 70.1845,271.507 70.7295,271.947 71.2745,272.388 71.8195,272.828 72.3645,273.268 72.9095,273.708 73.4545,274.148 \n",
       "  73.9996,274.588 74.5446,275.028 75.0896,275.469 75.6346,275.909 76.1796,276.349 76.7246,276.789 77.2696,277.229 77.8146,277.669 78.3596,278.109 78.9047,278.55 \n",
       "  79.4497,278.99 79.9947,279.43 80.5397,279.87 81.0847,280.31 81.6297,280.75 82.1747,281.19 82.7197,281.631 83.2647,282.071 83.8098,282.511 84.3548,282.951 \n",
       "  84.8998,283.391 85.4448,283.831 85.9898,284.271 86.5348,284.712 87.0798,285.152 87.6248,285.592 88.1698,286.032 88.7149,286.472 89.2599,286.912 89.8049,287.352 \n",
       "  90.3499,287.793 90.8949,288.233 91.4399,288.673 91.9849,289.113 92.5299,289.553 93.0749,289.993 93.62,290.433 94.165,290.873 94.71,291.314 95.255,291.754 \n",
       "  95.8,292.194 96.345,292.634 96.89,293.074 97.435,293.514 97.98,293.954 98.5251,294.395 99.0701,294.835 99.6151,295.275 100.16,295.715 100.705,296.155 \n",
       "  101.25,296.595 101.795,297.035 102.34,297.476 102.885,297.916 103.43,298.356 103.975,298.796 104.52,299.236 105.065,299.676 105.61,300.116 106.155,300.557 \n",
       "  106.7,300.997 107.245,301.437 107.79,301.877 108.335,302.317 108.88,153.199 109.425,153.639 109.97,154.08 110.515,154.52 111.06,154.96 111.605,155.4 \n",
       "  112.15,155.84 112.695,156.28 113.24,156.72 113.785,157.161 114.33,157.601 114.875,158.041 115.42,158.481 115.965,158.921 116.51,159.361 117.055,159.801 \n",
       "  117.6,160.242 118.145,160.682 118.69,161.122 119.235,161.562 119.78,162.002 120.326,162.442 120.871,162.882 121.416,163.323 121.961,163.763 122.506,164.203 \n",
       "  123.051,164.643 123.596,165.083 124.141,165.523 124.686,165.963 125.231,166.403 125.776,166.844 126.321,167.284 126.866,167.724 127.411,168.164 127.956,168.604 \n",
       "  128.501,169.044 129.046,169.484 129.591,169.925 130.136,170.365 130.681,170.805 131.226,171.245 131.771,171.685 132.316,172.125 132.861,172.565 133.406,173.006 \n",
       "  133.951,173.446 134.496,173.886 135.041,174.326 135.586,174.766 136.131,175.206 136.676,175.646 137.221,176.087 137.766,176.527 138.311,176.967 138.856,177.407 \n",
       "  139.401,177.847 139.946,178.287 140.491,178.727 141.036,179.168 141.581,179.608 142.126,180.048 142.671,180.488 143.216,180.928 143.761,181.368 144.306,181.808 \n",
       "  144.851,182.249 145.396,182.689 145.941,183.129 146.486,183.569 147.031,184.009 147.576,184.449 148.121,184.889 148.666,185.33 149.211,185.77 149.756,186.21 \n",
       "  150.301,186.65 150.846,187.09 151.391,187.53 151.936,187.97 152.481,188.411 153.026,188.851 153.571,189.291 154.116,189.731 154.661,190.171 155.206,190.611 \n",
       "  155.751,191.051 156.296,191.492 156.841,191.932 157.386,192.372 157.931,192.812 158.476,193.252 159.021,193.692 159.566,194.132 160.111,194.573 160.656,195.013 \n",
       "  161.201,195.453 161.746,195.893 162.291,196.333 162.836,196.773 163.381,197.213 163.926,197.653 164.471,198.094 165.016,198.534 165.561,198.974 166.106,199.414 \n",
       "  166.651,199.854 167.196,200.294 167.741,200.734 168.286,201.175 168.832,201.615 169.377,202.055 169.922,202.495 170.467,202.935 171.012,203.375 171.557,203.815 \n",
       "  172.102,204.256 172.647,204.696 173.192,205.136 173.737,205.576 174.282,206.016 174.827,206.456 175.372,206.896 175.917,207.337 176.462,207.777 177.007,208.217 \n",
       "  177.552,208.657 178.097,209.097 178.642,209.537 179.187,209.977 179.732,210.418 180.277,210.858 180.822,211.298 181.367,211.738 181.912,212.178 182.457,212.618 \n",
       "  183.002,213.058 183.547,213.499 184.092,213.939 184.637,214.379 185.182,214.819 185.727,215.259 186.272,215.699 186.817,216.139 187.362,216.58 187.907,217.02 \n",
       "  188.452,217.46 188.997,217.9 189.542,218.34 190.087,218.78 190.632,219.22 191.177,219.661 191.722,220.101 192.267,220.541 192.812,220.981 193.357,221.421 \n",
       "  193.902,221.861 194.447,222.301 194.992,222.742 195.537,223.182 196.082,223.622 196.627,224.062 197.172,224.502 197.717,224.942 198.262,225.382 198.807,225.822 \n",
       "  199.352,226.263 199.897,226.703 200.442,227.143 200.987,227.583 201.532,228.023 202.077,228.463 202.622,228.903 203.167,229.344 203.712,229.784 204.257,230.224 \n",
       "  204.802,230.664 205.347,231.104 205.892,231.544 206.437,231.984 206.982,232.425 207.527,232.865 208.072,233.305 208.617,233.745 209.162,234.185 209.707,234.625 \n",
       "  210.252,235.065 210.797,235.506 211.342,235.946 211.887,236.386 212.432,236.826 212.977,237.266 213.522,237.706 214.067,238.146 214.612,238.587 215.157,239.027 \n",
       "  215.702,239.467 216.247,239.907 216.792,240.347 217.338,240.787 217.883,241.227 218.428,241.668 218.973,242.108 219.518,242.548 220.063,242.988 220.608,243.428 \n",
       "  221.153,243.868 221.698,244.308 222.243,244.749 222.788,245.189 223.333,245.629 223.878,246.069 224.423,246.509 224.968,246.949 225.513,247.389 226.058,247.83 \n",
       "  226.603,248.27 227.148,248.71 227.693,249.15 228.238,249.59 228.783,250.03 229.328,250.47 229.873,250.911 230.418,251.351 230.963,251.791 231.508,252.231 \n",
       "  232.053,252.671 232.598,253.111 233.143,253.551 233.688,253.992 234.233,254.432 234.778,254.872 235.323,255.312 235.868,255.752 236.413,256.192 236.958,256.632 \n",
       "  237.503,257.072 238.048,257.513 238.593,257.953 239.138,258.393 239.683,258.833 240.228,259.273 240.773,259.713 241.318,260.153 241.863,260.594 242.408,261.034 \n",
       "  242.953,261.474 243.498,261.914 244.043,262.354 244.588,262.794 245.133,263.234 245.678,263.675 246.223,264.115 246.768,264.555 247.313,264.995 247.858,265.435 \n",
       "  248.403,265.875 248.948,266.315 249.493,266.756 250.038,267.196 250.583,267.636 251.128,268.076 251.673,268.516 252.218,268.956 252.763,269.396 253.308,269.837 \n",
       "  253.853,270.277 254.398,270.717 254.943,271.157 255.488,271.597 256.033,272.037 256.578,272.477 257.123,272.918 257.668,273.358 258.213,273.798 258.758,274.238 \n",
       "  259.303,274.678 259.848,275.118 260.393,275.558 260.938,275.999 261.483,276.439 262.028,276.879 262.573,277.319 263.118,277.759 263.663,278.199 264.208,278.639 \n",
       "  264.753,279.08 265.298,279.52 265.843,279.96 266.389,280.4 266.934,280.84 267.479,281.28 268.024,281.72 268.569,282.161 269.114,282.601 269.659,283.041 \n",
       "  270.204,283.481 270.749,283.921 271.294,284.361 271.839,284.801 272.384,285.241 272.929,285.682 273.474,286.122 274.019,286.562 274.564,287.002 275.109,287.442 \n",
       "  275.654,287.882 276.199,288.322 276.744,288.763 277.289,289.203 277.834,289.643 278.379,290.083 278.924,290.523 279.469,290.963 280.014,291.403 280.559,291.844 \n",
       "  281.104,292.284 281.649,292.724 282.194,293.164 282.739,293.604 283.284,294.044 283.829,294.484 284.374,294.925 284.919,295.365 285.464,295.805 286.009,296.245 \n",
       "  286.554,296.685 287.099,297.125 287.644,297.565 288.189,298.006 288.734,298.446 289.279,298.886 289.824,299.326 290.369,299.766 290.914,300.206 291.459,300.646 \n",
       "  292.004,301.087 292.549,301.527 293.094,301.967 293.639,302.407 294.184,302.847 294.729,303.287 295.274,303.727 295.819,304.168 296.364,304.608 296.909,305.048 \n",
       "  297.454,305.488 297.999,305.928 298.544,306.368 299.089,306.808 299.634,307.249 300.179,307.689 300.724,308.129 301.269,308.569 301.814,309.009 302.359,309.449 \n",
       "  302.904,309.889 303.449,310.33 303.994,310.77 304.539,311.21 305.084,311.65 305.629,312.09 306.174,312.53 306.719,312.97 307.264,313.41 307.809,313.851 \n",
       "  308.354,314.291 308.899,314.731 309.444,315.171 309.989,315.611 310.534,316.051 311.079,316.491 311.624,316.932 312.169,317.372 312.714,317.812 313.259,318.252 \n",
       "  313.804,318.692 314.349,319.132 314.895,319.572 315.44,320.013 315.985,320.453 316.53,320.893 317.075,321.333 317.62,321.773 318.165,322.213 318.71,322.653 \n",
       "  319.255,323.094 319.8,323.534 320.345,323.974 320.89,324.414 321.435,324.854 321.98,325.294 322.525,325.734 323.07,326.175 323.615,326.615 324.16,327.055 \n",
       "  324.705,327.495 325.25,327.935 325.795,328.375 326.34,328.815 326.885,329.256 327.43,329.696 327.975,330.136 328.52,330.576 329.065,331.016 329.61,331.456 \n",
       "  330.155,331.896 330.7,332.337 331.245,332.777 331.79,333.217 332.335,333.657 332.88,334.097 333.425,334.537 333.97,334.977 334.515,335.418 335.06,335.858 \n",
       "  335.605,336.298 336.15,336.738 336.695,337.178 337.24,337.618 337.785,338.058 338.33,338.499 338.875,338.939 339.42,339.379 339.965,339.819 340.51,340.259 \n",
       "  341.055,340.699 341.6,341.139 342.145,341.58 342.69,342.02 343.235,342.46 343.78,342.9 344.325,343.34 344.87,343.78 345.415,344.22 345.96,344.66 \n",
       "  346.505,345.101 347.05,345.541 347.595,345.981 348.14,346.421 348.685,346.861 349.23,347.301 349.775,347.741 350.32,348.182 350.865,348.622 351.41,349.062 \n",
       "  351.955,349.502 352.5,349.942 353.045,350.382 353.59,350.822 354.135,351.263 354.68,351.703 355.225,352.143 355.77,352.583 356.315,353.023 356.86,353.463 \n",
       "  357.405,353.903 357.95,354.344 358.495,354.784 359.04,355.224 359.585,355.664 360.13,356.104 360.675,356.544 361.22,356.984 361.765,357.425 362.31,357.865 \n",
       "  362.855,358.305 363.401,358.745 363.946,359.185 364.491,359.625 365.036,360.065 365.581,138.933 366.126,139.374 366.671,139.814 367.216,140.254 367.761,140.694 \n",
       "  368.306,141.134 368.851,141.574 369.396,142.014 369.941,142.455 370.486,142.895 371.031,143.335 371.576,143.775 372.121,144.215 372.666,144.655 373.211,145.095 \n",
       "  373.756,145.536 374.301,145.976 374.846,146.416 375.391,146.856 375.936,147.296 376.481,147.736 377.026,148.176 377.571,148.617 378.116,149.057 378.661,149.497 \n",
       "  379.206,149.937 379.751,150.377 380.296,150.817 380.841,151.257 381.386,151.698 381.931,152.138 382.476,152.578 383.021,153.018 383.566,153.458 384.111,153.898 \n",
       "  384.656,154.338 385.201,154.779 385.746,155.219 386.291,155.659 386.836,156.099 387.381,156.539 387.926,156.979 388.471,157.419 389.016,157.859 389.561,158.3 \n",
       "  390.106,158.74 390.651,159.18 391.196,159.62 391.741,160.06 392.286,160.5 392.831,160.94 393.376,161.381 393.921,161.821 394.466,162.261 395.011,162.701 \n",
       "  395.556,163.141 396.101,163.581 396.646,164.021 397.191,164.462 397.736,164.902 398.281,165.342 398.826,165.782 399.371,166.222 399.916,166.662 400.461,167.102 \n",
       "  401.006,167.543 401.551,167.983 402.096,168.423 402.641,168.863 403.186,169.303 403.731,169.743 404.276,170.183 404.821,170.624 405.366,171.064 405.911,171.504 \n",
       "  406.456,171.944 407.001,172.384 407.546,172.824 408.091,173.264 408.636,173.705 409.181,174.145 409.726,174.585 410.271,175.025 410.816,175.465 411.361,175.905 \n",
       "  411.906,176.345 412.452,176.786 412.997,177.226 413.542,177.666 414.087,178.106 414.632,178.546 415.177,178.986 415.722,179.426 416.267,179.867 416.812,180.307 \n",
       "  417.357,180.747 417.902,181.187 418.447,181.627 418.992,182.067 419.537,182.507 420.082,182.948 420.627,183.388 421.172,183.828 421.717,184.268 422.262,184.708 \n",
       "  422.807,185.148 423.352,185.588 423.897,186.028 424.442,186.469 424.987,186.909 425.532,187.349 426.077,187.789 426.622,188.229 427.167,188.669 427.712,189.109 \n",
       "  428.257,189.55 428.802,189.99 429.347,190.43 429.892,190.87 430.437,191.31 430.982,191.75 431.527,192.19 432.072,192.631 432.617,193.071 433.162,193.511 \n",
       "  433.707,193.951 434.252,194.391 434.797,194.831 435.342,195.271 435.887,195.712 436.432,196.152 436.977,196.592 437.522,197.032 438.067,197.472 438.612,197.912 \n",
       "  439.157,198.352 439.702,198.793 440.247,199.233 440.792,199.673 441.337,200.113 441.882,200.553 442.427,200.993 442.972,201.433 443.517,201.874 444.062,202.314 \n",
       "  444.607,202.754 445.152,203.194 445.697,203.634 446.242,204.074 446.787,204.514 447.332,204.955 447.877,205.395 448.422,205.835 448.967,206.275 449.512,206.715 \n",
       "  450.057,207.155 450.602,207.595 451.147,208.036 451.692,208.476 452.237,208.916 452.782,209.356 453.327,209.796 453.872,210.236 454.417,210.676 454.962,211.117 \n",
       "  455.507,211.557 456.052,211.997 456.597,212.437 457.142,212.877 457.687,213.317 458.232,213.757 458.777,214.198 459.322,214.638 459.867,215.078 460.412,215.518 \n",
       "  460.958,215.958 461.503,216.398 462.048,216.838 462.593,217.278 463.138,217.719 463.683,218.159 464.228,218.599 464.773,219.039 465.318,219.479 465.863,219.919 \n",
       "  466.408,220.359 466.953,220.8 467.498,221.24 468.043,221.68 468.588,222.12 469.133,222.56 469.678,223 470.223,223.44 470.768,223.881 471.313,224.321 \n",
       "  471.858,224.761 472.403,225.201 472.948,225.641 473.493,226.081 474.038,226.521 474.583,226.962 475.128,227.402 475.673,227.842 476.218,228.282 476.763,228.722 \n",
       "  477.308,229.162 477.853,229.602 478.398,230.043 478.943,230.483 479.488,230.923 480.033,231.363 480.578,231.803 481.123,232.243 481.668,232.683 482.213,233.124 \n",
       "  482.758,233.564 483.303,234.004 483.848,234.444 484.393,234.884 484.938,235.324 485.483,235.764 486.028,236.205 486.573,236.645 487.118,237.085 487.663,237.525 \n",
       "  488.208,237.965 488.753,238.405 489.298,238.845 489.843,239.286 490.388,239.726 490.933,240.166 491.478,240.606 492.023,241.046 492.568,241.486 493.113,241.926 \n",
       "  493.658,242.367 494.203,242.807 494.748,243.247 495.293,243.687 495.838,244.127 496.383,244.567 496.928,245.007 497.473,245.447 498.018,245.888 498.563,246.328 \n",
       "  499.108,246.768 499.653,247.208 500.198,247.648 500.743,248.088 501.288,248.528 501.833,248.969 502.378,249.409 502.923,249.849 503.468,250.289 504.013,250.729 \n",
       "  504.558,251.169 505.103,251.609 505.648,252.05 506.193,252.49 506.738,252.93 507.283,253.37 507.828,253.81 508.373,254.25 508.918,254.69 509.464,255.131 \n",
       "  510.009,255.571 510.554,256.011 511.099,256.451 511.644,256.891 512.189,257.331 512.734,257.771 513.279,258.212 513.824,258.652 514.369,259.092 514.914,259.532 \n",
       "  515.459,259.972 516.004,260.412 516.549,260.852 517.094,261.293 517.639,261.733 518.184,262.173 518.729,262.613 519.274,263.053 519.819,263.493 520.364,263.933 \n",
       "  520.909,264.374 521.454,264.814 521.999,265.254 522.544,265.694 523.089,266.134 523.634,266.574 524.179,267.014 524.724,267.455 525.269,267.895 525.814,268.335 \n",
       "  526.359,268.775 526.904,269.215 527.449,269.655 527.994,270.095 528.539,270.536 529.084,270.976 529.629,271.416 530.174,271.856 530.719,272.296 531.264,272.736 \n",
       "  531.809,273.176 532.354,273.617 532.899,274.057 533.444,274.497 533.989,274.937 534.534,275.377 535.079,275.817 535.624,276.257 536.169,276.697 536.714,277.138 \n",
       "  537.259,277.578 537.804,278.018 538.349,278.458 538.894,278.898 539.439,279.338 539.984,279.778 540.529,280.219 541.074,280.659 541.619,281.099 542.164,281.539 \n",
       "  542.709,281.979 543.254,282.419 543.799,282.859 544.344,283.3 544.889,283.74 545.434,284.18 545.979,284.62 546.524,285.06 547.069,285.5 547.614,285.94 \n",
       "  548.159,286.381 548.704,286.821 549.249,287.261 549.794,287.701 550.339,288.141 550.884,288.581 551.429,289.021 551.974,289.462 552.519,289.902 553.064,290.342 \n",
       "  553.609,290.782 554.154,291.222 554.699,291.662 555.244,292.102 555.789,292.543 556.334,292.983 556.879,293.423 557.424,293.863 557.97,294.303 558.515,294.743 \n",
       "  559.06,295.183 559.605,295.624 560.15,296.064 560.695,296.504 561.24,296.944 561.785,297.384 562.33,297.824 562.875,298.264 563.42,298.705 563.965,299.145 \n",
       "  564.51,299.585 565.055,300.025 565.6,300.465 566.145,300.905 566.69,301.345 567.235,301.786 567.78,302.226 568.325,302.666 568.87,303.106 569.415,303.546 \n",
       "  569.96,303.986 570.505,304.426 571.05,304.866 571.595,305.307 572.14,305.747 572.685,306.187 573.23,306.627 573.775,307.067 574.32,307.507 574.865,307.947 \n",
       "  575.41,308.388 575.955,308.828 576.5,309.268 577.045,309.708 577.59,310.148 578.135,310.588 578.68,311.028 579.225,311.469 579.77,311.909 580.315,312.349 \n",
       "  \n",
       "  \"/>\n",
       "<polygon clip-path=\"url(#clip1900)\" points=\"\n",
       "485.201,78.051 562.315,78.051 562.315,32.691 485.201,32.691 \n",
       "  \" fill=\"#ffffff\" fill-opacity=\"1\"/>\n",
       "<polyline clip-path=\"url(#clip1900)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  485.201,78.051 562.315,78.051 562.315,32.691 485.201,32.691 485.201,78.051 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip1900)\" style=\"stroke:#009af9; stroke-width:3; stroke-opacity:1; fill:none\" points=\"\n",
       "  491.201,47.811 527.201,47.811 \n",
       "  \"/>\n",
       "<g clip-path=\"url(#clip1900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:start;\" transform=\"rotate(0, 533.201, 52.311)\" x=\"533.201\" y=\"52.311\">y(t)</text>\n",
       "</g>\n",
       "<polyline clip-path=\"url(#clip1900)\" style=\"stroke:#e26f46; stroke-width:3; stroke-opacity:1; fill:none\" points=\"\n",
       "  491.201,62.931 527.201,62.931 \n",
       "  \"/>\n",
       "<g clip-path=\"url(#clip1900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:start;\" transform=\"rotate(0, 533.201, 67.431)\" x=\"533.201\" y=\"67.431\">v(t)</text>\n",
       "</g>\n",
       "</svg>\n"
      ]
     },
     "execution_count": 49,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "u0 = [50.0,0.0]\n",
    "tspan = (0.0,15.0)\n",
    "p = (9.8,0.9)\n",
    "prob = ODEProblem(ball!,u0,tspan,p,callback=cb)\n",
    "sol = solve(prob,Tsit5(),tstops=[2.0])\n",
    "plot(sol)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Notice that we have now merged the behaviors. We can then nest this as deep as we like.\n",
    "\n",
    "#### Exercise 2\n",
    "\n",
    "Add to the model a linear wind with resistance that changes the acceleration to `-g + k*v` after `t=10`. Do so by adding another parameter and allowing it to be zero until a specific time point where a third callback triggers the change."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Integration Termination and Directional Handling\n",
    "\n",
    "Let's look at another model now -- the model of the [Harmonic Oscillator](https://en.wikipedia.org/wiki/Harmonic_oscillator). We can write this as:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 108,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n",
       "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"600\" height=\"400\" viewBox=\"0 0 600 400\">\n",
       "<defs>\n",
       "  <clipPath id=\"clip8300\">\n",
       "    <rect x=\"0\" y=\"0\" width=\"600\" height=\"400\"/>\n",
       "  </clipPath>\n",
       "</defs>\n",
       "<polygon clip-path=\"url(#clip8300)\" points=\"\n",
       "0,400 600,400 600,0 0,0 \n",
       "  \" fill=\"#ffffff\" fill-opacity=\"1\"/>\n",
       "<defs>\n",
       "  <clipPath id=\"clip8301\">\n",
       "    <rect x=\"120\" y=\"0\" width=\"421\" height=\"400\"/>\n",
       "  </clipPath>\n",
       "</defs>\n",
       "<polygon clip-path=\"url(#clip8300)\" points=\"\n",
       "39.1436,360.065 580.315,360.065 580.315,11.811 39.1436,11.811 \n",
       "  \" fill=\"#ffffff\" fill-opacity=\"1\"/>\n",
       "<defs>\n",
       "  <clipPath id=\"clip8302\">\n",
       "    <rect x=\"39\" y=\"11\" width=\"542\" height=\"349\"/>\n",
       "  </clipPath>\n",
       "</defs>\n",
       "<polyline clip-path=\"url(#clip8302)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  39.1436,360.065 39.1436,11.811 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8302)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  147.378,360.065 147.378,11.811 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8302)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  255.612,360.065 255.612,11.811 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8302)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  363.846,360.065 363.846,11.811 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8302)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  472.081,360.065 472.081,11.811 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8302)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  580.315,360.065 580.315,11.811 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8302)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  39.1436,360.03 580.315,360.03 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8302)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  39.1436,272.982 580.315,272.982 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8302)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  39.1436,185.934 580.315,185.934 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8302)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  39.1436,98.886 580.315,98.886 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8302)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  39.1436,11.8381 580.315,11.8381 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8300)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  39.1436,360.065 580.315,360.065 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8300)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  39.1436,360.065 39.1436,11.811 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8300)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  39.1436,360.065 39.1436,354.842 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8300)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  147.378,360.065 147.378,354.842 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8300)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  255.612,360.065 255.612,354.842 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8300)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  363.846,360.065 363.846,354.842 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8300)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  472.081,360.065 472.081,354.842 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8300)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  580.315,360.065 580.315,354.842 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8300)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  39.1436,360.03 47.2612,360.03 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8300)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  39.1436,272.982 47.2612,272.982 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8300)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  39.1436,185.934 47.2612,185.934 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8300)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  39.1436,98.886 47.2612,98.886 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8300)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  39.1436,11.8381 47.2612,11.8381 \n",
       "  \"/>\n",
       "<g clip-path=\"url(#clip8300)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 39.1436, 373.865)\" x=\"39.1436\" y=\"373.865\">0</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip8300)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 147.378, 373.865)\" x=\"147.378\" y=\"373.865\">2</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip8300)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 255.612, 373.865)\" x=\"255.612\" y=\"373.865\">4</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip8300)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 363.846, 373.865)\" x=\"363.846\" y=\"373.865\">6</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip8300)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 472.081, 373.865)\" x=\"472.081\" y=\"373.865\">8</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip8300)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 580.315, 373.865)\" x=\"580.315\" y=\"373.865\">10</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip8300)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:end;\" transform=\"rotate(0, 33.1436, 364.53)\" x=\"33.1436\" y=\"364.53\">-1.0</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip8300)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:end;\" transform=\"rotate(0, 33.1436, 277.482)\" x=\"33.1436\" y=\"277.482\">-0.5</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip8300)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:end;\" transform=\"rotate(0, 33.1436, 190.434)\" x=\"33.1436\" y=\"190.434\">0.0</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip8300)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:end;\" transform=\"rotate(0, 33.1436, 103.386)\" x=\"33.1436\" y=\"103.386\">0.5</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip8300)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:end;\" transform=\"rotate(0, 33.1436, 16.3381)\" x=\"33.1436\" y=\"16.3381\">1.0</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip8300)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:16; text-anchor:middle;\" transform=\"rotate(0, 309.729, 397.6)\" x=\"309.729\" y=\"397.6\">t</text>\n",
       "</g>\n",
       "<polyline clip-path=\"url(#clip8302)\" style=\"stroke:#009af9; stroke-width:3; stroke-opacity:1; fill:none\" points=\"\n",
       "  39.1436,11.8381 39.6853,11.8468 40.227,11.873 40.7687,11.9166 41.3104,11.9776 41.8522,12.0561 42.3939,12.152 42.9356,12.2653 43.4773,12.396 44.019,12.5441 \n",
       "  44.5607,12.7096 45.1024,12.8924 45.6441,13.0926 46.1859,13.31 46.7276,13.5448 47.2693,13.7969 47.811,14.0662 48.3527,14.3527 48.8944,14.6564 49.4361,14.9773 \n",
       "  49.9778,15.3153 50.5196,15.6704 51.0613,16.0426 51.603,16.4318 52.1447,16.838 52.6864,17.2611 53.2281,17.7011 53.7698,18.158 54.3116,18.6316 54.8533,19.1221 \n",
       "  55.395,19.6293 55.9367,20.1531 56.4784,20.6935 57.0201,21.2505 57.5618,21.824 58.1035,22.4139 58.6453,23.0203 59.187,23.6429 59.7287,24.2818 60.2704,24.9369 \n",
       "  60.8121,25.6082 61.3538,26.2955 61.8955,26.9988 62.4372,27.718 62.979,28.4531 63.5207,29.2039 64.0624,29.9705 64.6041,30.7527 65.1458,31.5504 65.6875,32.3636 \n",
       "  66.2292,33.1922 66.771,34.0361 67.3127,34.8953 67.8544,35.7695 68.3961,36.6588 68.9378,37.5631 69.4795,38.4822 70.0212,39.4161 70.5629,40.3647 71.1047,41.3278 \n",
       "  71.6464,42.3055 72.1881,43.2975 72.7298,44.3038 73.2715,45.3244 73.8132,46.359 74.3549,47.4076 74.8967,48.4701 75.4384,49.5463 75.9801,50.6362 76.5218,51.7397 \n",
       "  77.0635,52.8567 77.6052,53.9869 78.1469,55.1304 78.6886,56.287 79.2304,57.4566 79.7721,58.6391 80.3138,59.8343 80.8555,61.0421 81.3972,62.2625 81.9389,63.4952 \n",
       "  82.4806,64.7402 83.0223,65.9974 83.5641,67.2666 84.1058,68.5477 84.6475,69.8405 85.1892,71.145 85.7309,72.4609 86.2726,73.7883 86.8143,75.1268 87.3561,76.4765 \n",
       "  87.8978,77.8372 88.4395,79.2086 88.9812,80.5908 89.5229,81.9835 90.0646,83.3866 90.6063,84.8 91.148,86.2235 91.6898,87.6571 92.2315,89.1004 92.7732,90.5535 \n",
       "  93.3149,92.0161 93.8566,93.4882 94.3983,94.9695 94.94,96.4599 95.4817,97.9593 96.0235,99.4675 96.5652,100.984 97.1069,102.51 97.6486,104.044 98.1903,105.586 \n",
       "  98.732,107.136 99.2737,108.693 99.8155,110.259 100.357,111.832 100.899,113.413 101.441,115.001 101.982,116.596 102.524,118.198 103.066,119.807 103.607,121.422 \n",
       "  104.149,123.044 104.691,124.672 105.233,126.306 105.774,127.947 106.316,129.593 106.858,131.245 107.399,132.902 107.941,134.564 108.483,136.232 109.025,137.905 \n",
       "  109.566,139.582 110.108,141.264 110.65,142.951 111.191,144.642 111.733,146.337 112.275,148.036 112.817,149.738 113.358,151.445 113.9,153.155 114.442,154.868 \n",
       "  114.983,156.584 115.525,158.303 116.067,160.025 116.609,161.75 117.15,163.476 117.692,165.206 118.234,166.937 118.775,168.67 119.317,170.405 119.859,172.142 \n",
       "  120.401,173.88 120.942,175.619 121.484,177.359 122.026,179.1 122.567,180.841 123.109,182.584 123.651,184.326 124.193,186.069 124.734,187.812 125.276,189.554 \n",
       "  125.818,191.296 126.359,193.038 126.901,194.779 127.443,196.519 127.985,198.258 128.526,199.995 129.068,201.732 129.61,203.466 130.151,205.199 130.693,206.931 \n",
       "  131.235,208.659 131.777,210.386 132.318,212.11 132.86,213.832 133.402,215.551 133.943,217.267 134.485,218.979 135.027,220.689 135.569,222.394 136.11,224.097 \n",
       "  136.652,225.795 137.194,227.489 137.735,229.18 138.277,230.865 138.819,232.547 139.361,234.223 139.902,235.895 140.444,237.562 140.986,239.224 141.527,240.88 \n",
       "  142.069,242.531 142.611,244.176 143.152,245.815 143.694,247.449 144.236,249.076 144.778,250.697 145.319,252.311 145.861,253.919 146.403,255.52 146.944,257.114 \n",
       "  147.486,258.7 148.028,260.28 148.57,261.852 149.111,263.416 149.653,264.973 150.195,266.522 150.736,268.063 151.278,269.595 151.82,271.119 152.362,272.635 \n",
       "  152.903,274.142 153.445,275.64 153.987,277.129 154.528,278.609 155.07,280.079 155.612,281.541 156.154,282.992 156.695,284.434 157.237,285.866 157.779,287.288 \n",
       "  158.32,288.7 158.862,290.102 159.404,291.493 159.946,292.874 160.487,294.244 161.029,295.603 161.571,296.951 162.112,298.288 162.654,299.613 163.196,300.928 \n",
       "  163.738,302.23 164.279,303.521 164.821,304.801 165.363,306.068 165.904,307.323 166.446,308.566 166.988,309.797 167.53,311.015 168.071,312.221 168.613,313.414 \n",
       "  169.155,314.595 169.696,315.762 170.238,316.917 170.78,318.058 171.322,319.186 171.863,320.301 172.405,321.402 172.947,322.49 173.488,323.564 174.03,324.625 \n",
       "  174.572,325.671 175.114,326.703 175.655,327.722 176.197,328.726 176.739,329.715 177.28,330.691 177.822,331.652 178.364,332.598 178.906,333.53 179.447,334.446 \n",
       "  179.989,335.348 180.531,336.235 181.072,337.107 181.614,337.964 182.156,338.805 182.698,339.632 183.239,340.443 183.781,341.238 184.323,342.018 184.864,342.782 \n",
       "  185.406,343.531 185.948,344.263 186.49,344.98 187.031,345.681 187.573,346.366 188.115,347.035 188.656,347.688 189.198,348.325 189.74,348.945 190.282,349.549 \n",
       "  190.823,350.136 191.365,350.708 191.907,351.262 192.448,351.8 192.99,352.322 193.532,352.826 194.074,353.314 194.615,353.785 195.157,354.24 195.699,354.677 \n",
       "  196.24,355.098 196.782,355.502 197.324,355.888 197.866,356.258 198.407,356.61 198.949,356.945 199.491,357.264 200.032,357.565 200.574,357.848 201.116,358.115 \n",
       "  201.658,358.364 202.199,358.596 202.741,358.811 203.283,359.008 203.824,359.188 204.366,359.351 204.908,359.496 205.45,359.624 205.991,359.735 206.533,359.828 \n",
       "  207.075,359.903 207.616,359.961 208.158,360.002 208.7,360.025 209.241,360.031 209.783,360.02 210.325,359.991 210.867,359.944 211.408,359.88 211.95,359.799 \n",
       "  212.492,359.7 213.033,359.584 213.575,359.45 214.117,359.3 214.659,359.131 215.2,358.946 215.742,358.743 216.284,358.523 216.825,358.285 217.367,358.03 \n",
       "  217.909,357.758 218.451,357.469 218.992,357.163 219.534,356.839 220.076,356.499 220.617,356.141 221.159,355.767 221.701,355.375 222.243,354.966 222.784,354.541 \n",
       "  223.326,354.098 223.868,353.639 224.409,353.163 224.951,352.67 225.493,352.16 226.035,351.634 226.576,351.091 227.118,350.532 227.66,349.956 228.201,349.363 \n",
       "  228.743,348.754 229.285,348.129 229.827,347.488 230.368,346.831 230.91,346.157 231.452,345.467 231.993,344.761 232.535,344.04 233.077,343.302 233.619,342.549 \n",
       "  234.16,341.78 234.702,340.995 235.244,340.195 235.785,339.38 236.327,338.549 236.869,337.702 237.411,336.841 237.952,335.964 238.494,335.072 239.036,334.165 \n",
       "  239.577,333.244 240.119,332.307 240.661,331.356 241.203,330.391 241.744,329.411 242.286,328.416 242.828,327.407 243.369,326.384 243.911,325.347 244.453,324.296 \n",
       "  244.995,323.231 245.536,322.153 246.078,321.06 246.62,319.955 247.161,318.836 247.703,317.703 248.245,316.557 248.787,315.399 249.328,314.227 249.87,313.043 \n",
       "  250.412,311.845 250.953,310.635 251.495,309.413 252.037,308.178 252.579,306.932 253.12,305.673 253.662,304.401 254.204,303.119 254.745,301.824 255.287,300.518 \n",
       "  255.829,299.2 256.371,297.871 256.912,296.531 257.454,295.18 257.996,293.817 258.537,292.444 259.079,291.061 259.621,289.666 260.163,288.262 260.704,286.847 \n",
       "  261.246,285.422 261.788,283.987 262.329,282.542 262.871,281.088 263.413,279.624 263.955,278.151 264.496,276.668 265.038,275.177 265.58,273.676 266.121,272.167 \n",
       "  266.663,270.648 267.205,269.122 267.747,267.587 268.288,266.044 268.83,264.493 269.372,262.934 269.913,261.367 270.455,259.793 270.997,258.211 271.539,256.622 \n",
       "  272.08,255.026 272.622,253.422 273.164,251.813 273.705,250.196 274.247,248.573 274.789,246.944 275.33,245.308 275.872,243.667 276.414,242.02 276.956,240.367 \n",
       "  277.497,238.708 278.039,237.045 278.581,235.376 279.122,233.702 279.664,232.024 280.206,230.341 280.748,228.653 281.289,226.961 281.831,225.265 282.373,223.565 \n",
       "  282.914,221.861 283.456,220.154 283.998,218.443 284.54,216.729 285.081,215.013 285.623,213.293 286.165,211.57 286.706,209.845 287.248,208.118 287.79,206.388 \n",
       "  288.332,204.656 288.873,202.923 289.415,201.187 289.957,199.45 290.498,197.712 291.04,195.973 291.582,194.232 292.124,192.491 292.665,190.749 293.207,189.007 \n",
       "  293.749,187.264 294.29,185.521 294.832,183.778 295.374,182.036 295.916,180.294 296.457,178.552 296.999,176.811 297.541,175.071 298.082,173.333 298.624,171.595 \n",
       "  299.166,169.859 299.708,168.125 300.249,166.392 300.791,164.662 301.333,162.933 301.874,161.207 302.416,159.483 302.958,157.762 303.5,156.044 304.041,154.329 \n",
       "  304.583,152.617 305.125,150.908 305.666,149.203 306.208,147.502 306.75,145.804 307.292,144.111 307.833,142.421 308.375,140.736 308.917,139.056 309.458,137.38 \n",
       "  310,135.709 310.542,134.043 311.084,132.382 311.625,130.726 312.167,129.076 312.709,127.432 313.25,125.794 313.792,124.161 314.334,122.535 314.876,120.915 \n",
       "  315.417,119.302 315.959,117.695 316.501,116.095 317.042,114.502 317.584,112.916 318.126,111.337 318.668,109.766 319.209,108.203 319.751,106.647 320.293,105.099 \n",
       "  320.834,103.56 321.376,102.028 321.918,100.505 322.46,98.9907 323.001,97.485 323.543,95.9882 324.085,94.5004 324.626,93.0219 325.168,91.5527 325.71,90.093 \n",
       "  326.252,88.6429 326.793,87.2025 327.335,85.7719 327.877,84.3513 328.418,82.9409 328.96,81.5407 329.502,80.151 330.044,78.7719 330.585,77.4035 331.127,76.0459 \n",
       "  331.669,74.6994 332.21,73.364 332.752,72.0399 333.294,70.7272 333.836,69.4261 334.377,68.1366 334.919,66.859 335.461,65.5933 336.002,64.3397 336.544,63.0983 \n",
       "  337.086,61.8692 337.627,60.6526 338.169,59.4485 338.711,58.2571 339.253,57.0786 339.794,55.913 340.336,54.7604 340.878,53.621 341.419,52.4949 341.961,51.3822 \n",
       "  342.503,50.2829 343.045,49.1973 343.586,48.1254 344.128,47.0673 344.67,46.0232 345.211,44.9931 345.753,43.9771 346.295,42.9754 346.837,41.988 347.378,41.015 \n",
       "  347.92,40.0566 348.462,39.1128 349.003,38.1837 349.545,37.2694 350.087,36.37 350.629,35.4856 351.17,34.6162 351.712,33.7621 352.254,32.9232 352.795,32.0996 \n",
       "  353.337,31.2914 353.879,30.4987 354.421,29.7216 354.962,28.9601 355.504,28.2143 356.046,27.4844 356.587,26.7703 357.129,26.0721 357.671,25.39 358.213,24.7239 \n",
       "  358.754,24.074 359.296,23.4403 359.838,22.8228 360.379,22.2217 360.921,21.637 361.463,21.0687 362.005,20.517 362.546,19.9818 363.088,19.4632 363.63,18.9613 \n",
       "  364.171,18.4762 364.713,18.0077 365.255,17.556 365.797,17.1211 366.338,16.703 366.88,16.3018 367.422,15.9176 367.963,15.5504 368.505,15.2003 369.047,14.8672 \n",
       "  369.589,14.5512 370.13,14.2523 370.672,13.9706 371.214,13.7062 371.755,13.459 372.297,13.2291 372.839,13.0164 373.381,12.8211 373.922,12.6431 374.464,12.4826 \n",
       "  375.006,12.3393 375.547,12.2135 376.089,12.1052 376.631,12.0142 377.173,11.9407 377.714,11.8846 378.256,11.8461 378.798,11.8249 379.339,11.8213 379.881,11.8351 \n",
       "  380.423,11.8664 380.965,11.9152 381.506,11.9814 382.048,12.0651 382.59,12.1663 383.131,12.2849 383.673,12.421 384.215,12.5744 384.757,12.7453 385.298,12.9336 \n",
       "  385.84,13.1392 386.382,13.3622 386.923,13.6026 387.465,13.8602 388.007,14.1352 388.549,14.4273 389.09,14.7367 389.632,15.0633 390.174,15.4071 390.715,15.768 \n",
       "  391.257,16.1459 391.799,16.5409 392.341,16.953 392.882,17.3819 393.424,17.8278 393.966,18.2906 394.507,18.7702 395.049,19.2666 395.591,19.7797 396.133,20.3094 \n",
       "  396.674,20.8558 397.216,21.4187 397.758,21.9981 398.299,22.5939 398.841,23.2061 399.383,23.8346 399.925,24.4794 400.466,25.1403 401.008,25.8173 401.55,26.5103 \n",
       "  402.091,27.2193 402.633,27.9441 403.175,28.6847 403.716,29.4411 404.258,30.213 404.8,31.0005 405.342,31.8035 405.883,32.6218 406.425,33.4554 406.967,34.3042 \n",
       "  407.508,35.1682 408.05,36.0473 408.592,36.9414 409.134,37.8504 409.675,38.7743 410.217,39.7128 410.759,40.666 411.3,41.6337 411.842,42.6159 412.384,43.6124 \n",
       "  412.926,44.6231 413.467,45.648 414.009,46.687 414.551,47.7398 415.092,48.8065 415.634,49.887 416.176,50.981 416.718,52.0886 417.259,53.2095 417.801,54.3438 \n",
       "  418.343,55.4912 418.884,56.6517 419.426,57.8252 419.968,59.0115 420.51,60.2105 421.051,61.4221 421.593,62.6462 422.135,63.8826 422.676,65.1313 423.218,66.3922 \n",
       "  423.76,67.665 424.302,68.9497 424.843,70.2461 425.385,71.5541 425.927,72.8736 426.468,74.2045 427.01,75.5466 427.552,76.8998 428.094,78.2639 428.635,79.6389 \n",
       "  429.177,81.0245 429.719,82.4207 430.26,83.8273 430.802,85.2442 431.344,86.6711 431.886,88.1081 432.427,89.5549 432.969,91.0114 433.511,92.4774 434.052,93.9529 \n",
       "  434.594,95.4375 435.136,96.9313 435.678,98.434 436.219,99.9455 436.761,101.466 437.303,102.994 437.844,104.531 438.386,106.076 438.928,107.63 439.47,109.191 \n",
       "  440.011,110.759 440.553,112.335 441.095,113.919 441.636,115.51 442.178,117.108 442.72,118.712 443.262,120.324 443.803,121.941 444.345,123.566 444.887,125.196 \n",
       "  445.428,126.832 445.97,128.475 446.512,130.123 447.054,131.776 447.595,133.435 448.137,135.1 448.679,136.769 449.22,138.444 449.762,140.123 450.304,141.807 \n",
       "  450.846,143.495 451.387,145.187 451.929,146.884 452.471,148.584 453.012,150.288 453.554,151.996 454.096,153.707 454.638,155.421 455.179,157.139 455.721,158.859 \n",
       "  456.263,160.582 456.804,162.307 457.346,164.035 457.888,165.765 458.43,167.497 458.971,169.23 459.513,170.966 460.055,172.702 460.596,174.44 461.138,176.18 \n",
       "  461.68,177.92 462.222,179.661 462.763,181.403 463.305,183.145 463.847,184.887 464.388,186.629 464.93,188.372 465.472,190.114 466.013,191.856 466.555,193.597 \n",
       "  467.097,195.337 467.639,197.077 468.18,198.815 468.722,200.552 469.264,202.288 469.805,204.022 470.347,205.754 470.889,207.484 471.431,209.212 471.972,210.938 \n",
       "  472.514,212.662 473.056,214.383 473.597,216.1 474.139,217.815 474.681,219.527 475.223,221.236 475.764,222.941 476.306,224.642 476.848,226.34 477.389,228.033 \n",
       "  477.931,229.723 478.473,231.407 479.015,233.088 479.556,234.764 480.098,236.435 480.64,238.101 481.181,239.761 481.723,241.417 482.265,243.066 482.807,244.71 \n",
       "  483.348,246.349 483.89,247.981 484.432,249.607 484.973,251.226 485.515,252.839 486.057,254.446 486.599,256.045 487.14,257.637 487.682,259.222 488.224,260.8 \n",
       "  488.765,262.37 489.307,263.933 489.849,265.487 490.391,267.033 490.932,268.572 491.474,270.101 492.016,271.623 492.557,273.136 493.099,274.64 493.641,276.136 \n",
       "  494.183,277.622 494.724,279.1 495.266,280.568 495.808,282.026 496.349,283.475 496.891,284.914 497.433,286.343 497.975,287.763 498.516,289.171 499.058,290.57 \n",
       "  499.6,291.958 500.141,293.336 500.683,294.702 501.225,296.058 501.767,297.403 502.308,298.736 502.85,300.058 503.392,301.369 503.933,302.668 504.475,303.956 \n",
       "  505.017,305.231 505.559,306.495 506.1,307.746 506.642,308.986 507.184,310.213 507.725,311.427 508.267,312.629 508.809,313.818 509.351,314.994 509.892,316.158 \n",
       "  510.434,317.308 510.976,318.445 511.517,319.569 512.059,320.679 512.601,321.776 513.143,322.859 513.684,323.929 514.226,324.984 514.768,326.026 515.309,327.054 \n",
       "  515.851,328.068 516.393,329.067 516.935,330.052 517.476,331.022 518.018,331.978 518.56,332.92 519.101,333.846 519.643,334.758 520.185,335.655 520.727,336.537 \n",
       "  521.268,337.404 521.81,338.256 522.352,339.092 522.893,339.913 523.435,340.719 523.977,341.509 524.519,342.284 525.06,343.043 525.602,343.786 526.144,344.514 \n",
       "  526.685,345.225 527.227,345.921 527.769,346.6 528.311,347.264 528.852,347.911 529.394,348.542 529.936,349.157 530.477,349.755 531.019,350.337 531.561,350.903 \n",
       "  532.102,351.452 532.644,351.985 533.186,352.501 533.728,353.001 534.269,353.484 534.811,353.95 535.353,354.399 535.894,354.832 536.436,355.247 536.978,355.646 \n",
       "  537.52,356.028 538.061,356.393 538.603,356.74 539.145,357.071 539.686,357.384 540.228,357.681 540.77,357.96 541.312,358.222 541.853,358.466 542.395,358.694 \n",
       "  542.937,358.904 543.478,359.096 544.02,359.272 544.562,359.429 545.104,359.57 545.645,359.693 546.187,359.799 546.729,359.887 547.27,359.957 547.812,360.011 \n",
       "  548.354,360.046 548.896,360.065 549.437,360.065 549.979,360.049 550.521,360.014 551.062,359.963 551.604,359.894 552.146,359.807 552.688,359.703 553.229,359.581 \n",
       "  553.771,359.442 554.313,359.286 554.854,359.112 555.396,358.92 555.938,358.712 556.48,358.486 557.021,358.242 557.563,357.982 558.105,357.704 558.646,357.408 \n",
       "  559.188,357.096 559.73,356.766 560.272,356.419 560.813,356.055 561.355,355.674 561.897,355.276 562.438,354.861 562.98,354.429 563.522,353.98 564.064,353.514 \n",
       "  564.605,353.031 565.147,352.532 565.689,352.016 566.23,351.483 566.772,350.933 567.314,350.367 567.856,349.785 568.397,349.186 568.939,348.571 569.481,347.939 \n",
       "  570.022,347.291 570.564,346.627 571.106,345.947 571.648,345.251 572.189,344.539 572.731,343.812 573.273,343.068 573.814,342.309 574.356,341.534 574.898,340.744 \n",
       "  575.44,339.938 575.981,339.117 576.523,338.28 577.065,337.429 577.606,336.562 578.148,335.681 578.69,334.784 579.232,333.872 579.773,332.946 580.315,332.004 \n",
       "  \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8302)\" style=\"stroke:#e26f46; stroke-width:3; stroke-opacity:1; fill:none\" points=\"\n",
       "  39.1436,185.934 39.6853,184.191 40.227,182.449 40.7687,180.707 41.3104,178.965 41.8522,177.224 42.3939,175.484 42.9356,173.745 43.4773,172.007 44.019,170.271 \n",
       "  44.5607,168.536 45.1024,166.803 45.6441,165.072 46.1859,163.343 46.7276,161.616 47.2693,159.892 47.811,158.17 48.3527,156.451 48.8944,154.735 49.4361,153.022 \n",
       "  49.9778,151.312 50.5196,149.606 51.0613,147.904 51.603,146.205 52.1447,144.51 52.6864,142.82 53.2281,141.133 53.7698,139.452 54.3116,137.775 54.8533,136.102 \n",
       "  55.395,134.435 55.9367,132.773 56.4784,131.116 57.0201,129.465 57.5618,127.819 58.1035,126.18 58.6453,124.546 59.187,122.918 59.7287,121.297 60.2704,119.682 \n",
       "  60.8121,118.074 61.3538,116.472 61.8955,114.878 62.4372,113.29 62.979,111.71 63.5207,110.138 64.0624,108.573 64.6041,107.015 65.1458,105.466 65.6875,103.925 \n",
       "  66.2292,102.391 66.771,100.867 67.3127,99.3505 67.8544,97.843 68.3961,96.3442 68.9378,94.8545 69.4795,93.3739 70.0212,91.9025 70.5629,90.4406 71.1047,88.9883 \n",
       "  71.6464,87.5457 72.1881,86.1129 72.7298,84.6901 73.2715,83.2775 73.8132,81.8752 74.3549,80.4833 74.8967,79.1019 75.4384,77.7313 75.9801,76.3715 76.5218,75.0227 \n",
       "  77.0635,73.685 77.6052,72.3586 78.1469,71.0435 78.6886,69.7399 79.2304,68.448 79.7721,67.1678 80.3138,65.8996 80.8555,64.6434 81.3972,63.3993 81.9389,62.1675 \n",
       "  82.4806,60.9481 83.0223,59.7412 83.5641,58.547 84.1058,57.3655 84.6475,56.1969 85.1892,55.0413 85.7309,53.8988 86.2726,52.7695 86.8143,51.6536 87.3561,50.5512 \n",
       "  87.8978,49.4623 88.4395,48.3871 88.9812,47.3256 89.5229,46.2781 90.0646,45.2446 90.6063,44.2251 91.148,43.2199 91.6898,42.229 92.2315,41.2525 92.7732,40.2904 \n",
       "  93.3149,39.343 93.8566,38.4103 94.3983,37.4923 94.94,36.5892 95.4817,35.7011 96.0235,34.828 96.5652,33.9701 97.1069,33.1274 97.6486,32.3 98.1903,31.488 \n",
       "  98.732,30.6915 99.2737,29.9105 99.8155,29.1452 100.357,28.3956 100.899,27.6617 101.441,26.9437 101.982,26.2417 102.524,25.5556 103.066,24.8856 103.607,24.2318 \n",
       "  104.149,23.5941 104.691,22.9727 105.233,22.3676 105.774,21.7789 106.316,21.2066 106.858,20.6508 107.399,20.1116 107.941,19.5891 108.483,19.0831 109.025,18.594 \n",
       "  109.566,18.1215 110.108,17.6659 110.65,17.2272 111.191,16.8053 111.733,16.4005 112.275,16.0126 112.817,15.6417 113.358,15.2879 113.9,14.9512 114.442,14.6317 \n",
       "  114.983,14.3293 115.525,14.0441 116.067,13.7761 116.609,13.5254 117.15,13.292 117.692,13.0759 118.234,12.8771 118.775,12.6956 119.317,12.5316 119.859,12.3848 \n",
       "  120.401,12.2555 120.942,12.1436 121.484,12.0491 122.026,11.972 122.567,11.9124 123.109,11.8701 123.651,11.8454 124.193,11.838 124.734,11.8481 125.276,11.8757 \n",
       "  125.818,11.9207 126.359,11.9831 126.901,12.0629 127.443,12.1602 127.985,12.2748 128.526,12.4069 129.068,12.5563 129.61,12.7231 130.151,12.9072 130.693,13.1087 \n",
       "  131.235,13.3275 131.777,13.5636 132.318,13.817 132.86,14.0876 133.402,14.3754 133.943,14.6804 134.485,15.0025 135.027,15.3418 135.569,15.6982 136.11,16.0717 \n",
       "  136.652,16.4621 137.194,16.8696 137.735,17.294 138.277,17.7353 138.819,18.1934 139.361,18.6684 139.902,19.1601 140.444,19.6686 140.986,20.1937 141.527,20.7354 \n",
       "  142.069,21.2937 142.611,21.8685 143.152,22.4597 143.694,23.0673 144.236,23.6913 144.778,24.3315 145.319,24.9879 145.861,25.6604 146.403,26.349 146.944,27.0536 \n",
       "  147.486,27.7741 148.028,28.5105 148.57,29.2626 149.111,30.0305 149.653,30.8139 150.195,31.6129 150.736,32.4274 151.278,33.2572 151.82,34.1023 152.362,34.9626 \n",
       "  152.903,35.8381 153.445,36.7285 153.987,37.634 154.528,38.5542 155.07,39.4893 155.612,40.439 156.154,41.4033 156.695,42.382 157.237,43.3752 157.779,44.3826 \n",
       "  158.32,45.4042 158.862,46.4398 159.404,47.4895 159.946,48.553 160.487,49.6302 161.029,50.7212 161.571,51.8256 162.112,52.9435 162.654,54.0747 163.196,55.2192 \n",
       "  163.738,56.3767 164.279,57.5472 164.821,58.7306 165.363,59.9267 165.904,61.1354 166.446,62.3567 166.988,63.5903 167.53,64.8362 168.071,66.0943 168.613,67.3644 \n",
       "  169.155,68.6463 169.696,69.94 170.238,71.2454 170.78,72.5622 171.322,73.8905 171.863,75.2299 172.405,76.5805 172.947,77.942 173.488,79.3144 174.03,80.6975 \n",
       "  174.572,82.0911 175.114,83.4951 175.655,84.9094 176.197,86.3339 176.739,87.7683 177.28,89.2126 177.822,90.6665 178.364,92.13 178.906,93.603 179.447,95.0851 \n",
       "  179.989,96.5764 180.531,98.0765 181.072,99.5855 181.614,101.103 182.156,102.629 182.698,104.164 183.239,105.706 183.781,107.257 184.323,108.815 184.864,110.382 \n",
       "  185.406,111.956 185.948,113.537 186.49,115.125 187.031,116.721 187.573,118.324 188.115,119.933 188.656,121.549 189.198,123.171 189.74,124.8 190.282,126.435 \n",
       "  190.823,128.075 191.365,129.722 191.907,131.374 192.448,133.031 192.99,134.694 193.532,136.362 194.074,138.035 194.615,139.713 195.157,141.395 195.699,143.082 \n",
       "  196.24,144.773 196.782,146.468 197.324,148.168 197.866,149.871 198.407,151.577 198.949,153.287 199.491,155 200.032,156.717 200.574,158.436 201.116,160.158 \n",
       "  201.658,161.883 202.199,163.61 202.741,165.339 203.283,167.071 203.824,168.804 204.366,170.539 204.908,172.276 205.45,174.014 205.991,175.753 206.533,177.493 \n",
       "  207.075,179.235 207.616,180.976 208.158,182.719 208.7,184.461 209.241,186.204 209.783,187.947 210.325,189.69 210.867,191.432 211.408,193.174 211.95,194.915 \n",
       "  212.492,196.655 213.033,198.394 213.575,200.132 214.117,201.868 214.659,203.603 215.2,205.335 215.742,207.066 216.284,208.795 216.825,210.522 217.367,212.246 \n",
       "  217.909,213.967 218.451,215.686 218.992,217.401 219.534,219.114 220.076,220.823 220.617,222.529 221.159,224.231 221.701,225.929 222.243,227.623 222.784,229.313 \n",
       "  223.326,230.999 223.868,232.68 224.409,234.357 224.951,236.028 225.493,237.695 226.035,239.356 226.576,241.012 227.118,242.662 227.66,244.307 228.201,245.946 \n",
       "  228.743,247.579 229.285,249.205 229.827,250.826 230.368,252.44 230.91,254.047 231.452,255.647 231.993,257.24 232.535,258.826 233.077,260.405 233.619,261.977 \n",
       "  234.16,263.54 234.702,265.096 235.244,266.644 235.785,268.184 236.327,269.716 236.869,271.239 237.411,272.754 237.952,274.26 238.494,275.758 239.036,277.246 \n",
       "  239.577,278.725 240.119,280.195 240.661,281.655 241.203,283.106 241.744,284.547 242.286,285.978 242.828,287.4 243.369,288.811 243.911,290.211 244.453,291.602 \n",
       "  244.995,292.982 245.536,294.351 246.078,295.709 246.62,297.056 247.161,298.392 247.703,299.717 248.245,301.03 248.787,302.332 249.328,303.622 249.87,304.9 \n",
       "  250.412,306.167 250.953,307.421 251.495,308.663 252.037,309.893 252.579,311.111 253.12,312.316 253.662,313.509 254.204,314.688 254.745,315.855 255.287,317.009 \n",
       "  255.829,318.15 256.371,319.277 256.912,320.391 257.454,321.492 257.996,322.579 258.537,323.652 259.079,324.712 259.621,325.757 260.163,326.789 260.704,327.806 \n",
       "  261.246,328.81 261.788,329.799 262.329,330.773 262.871,331.733 263.413,332.678 263.955,333.609 264.496,334.524 265.038,335.425 265.58,336.311 266.121,337.182 \n",
       "  266.663,338.037 267.205,338.878 267.747,339.703 268.288,340.512 268.83,341.306 269.372,342.085 269.913,342.847 270.455,343.594 270.997,344.326 271.539,345.041 \n",
       "  272.08,345.74 272.622,346.424 273.164,347.091 273.705,347.742 274.247,348.377 274.789,348.996 275.33,349.598 275.872,350.184 276.414,350.753 276.956,351.306 \n",
       "  277.497,351.843 278.039,352.362 278.581,352.865 279.122,353.352 279.664,353.821 280.206,354.274 280.748,354.71 281.289,355.129 281.831,355.531 282.373,355.916 \n",
       "  282.914,356.284 283.456,356.635 283.998,356.969 284.54,357.286 285.081,357.586 285.623,357.868 286.165,358.133 286.706,358.381 287.248,358.612 287.79,358.826 \n",
       "  288.332,359.022 288.873,359.201 289.415,359.362 289.957,359.506 290.498,359.633 291.04,359.743 291.582,359.835 292.124,359.91 292.665,359.967 293.207,360.007 \n",
       "  293.749,360.029 294.29,360.034 294.832,360.022 295.374,359.992 295.916,359.945 296.457,359.88 296.999,359.798 297.541,359.698 298.082,359.581 298.624,359.447 \n",
       "  299.166,359.295 299.708,359.126 300.249,358.939 300.791,358.735 301.333,358.514 301.874,358.275 302.416,358.019 302.958,357.746 303.5,357.456 304.041,357.148 \n",
       "  304.583,356.823 305.125,356.481 305.666,356.122 306.208,355.746 306.75,355.353 307.292,354.943 307.833,354.516 308.375,354.072 308.917,353.611 309.458,353.133 \n",
       "  310,352.638 310.542,352.127 311.084,351.599 311.625,351.054 312.167,350.493 312.709,349.916 313.25,349.321 313.792,348.711 314.334,348.084 314.876,347.441 \n",
       "  315.417,346.782 315.959,346.106 316.501,345.415 317.042,344.707 317.584,343.984 318.126,343.244 318.668,342.489 319.209,341.718 319.751,340.932 320.293,340.13 \n",
       "  320.834,339.313 321.376,338.48 321.918,337.632 322.46,336.769 323.001,335.891 323.543,334.998 324.085,334.09 324.626,333.167 325.168,332.23 325.71,331.278 \n",
       "  326.252,330.311 326.793,329.33 327.335,328.334 327.877,327.325 328.418,326.301 328.96,325.263 329.502,324.211 330.044,323.145 330.585,322.066 331.127,320.973 \n",
       "  331.669,319.866 332.21,318.746 332.752,317.613 333.294,316.467 333.836,315.307 334.377,314.135 334.919,312.949 335.461,311.751 336.002,310.541 336.544,309.318 \n",
       "  337.086,308.082 337.627,306.835 338.169,305.575 338.711,304.303 339.253,303.019 339.794,301.724 340.336,300.417 340.878,299.099 341.419,297.769 341.961,296.428 \n",
       "  342.503,295.076 343.045,293.713 343.586,292.339 344.128,290.954 344.67,289.559 345.211,288.154 345.753,286.738 346.295,285.312 346.837,283.876 347.378,282.43 \n",
       "  347.92,280.975 348.462,279.51 349.003,278.036 349.545,276.552 350.087,275.059 350.629,273.557 351.17,272.047 351.712,270.528 352.254,269 352.795,267.464 \n",
       "  353.337,265.92 353.879,264.368 354.421,262.807 354.962,261.24 355.504,259.664 356.046,258.081 356.587,256.491 357.129,254.894 357.671,253.29 358.213,251.679 \n",
       "  358.754,250.062 359.296,248.438 359.838,246.808 360.379,245.172 360.921,243.53 361.463,241.882 362.005,240.229 362.546,238.57 363.088,236.906 363.63,235.237 \n",
       "  364.171,233.563 364.713,231.884 365.255,230.201 365.797,228.513 366.338,226.821 366.88,225.125 367.422,223.425 367.963,221.721 368.505,220.014 369.047,218.303 \n",
       "  369.589,216.589 370.13,214.872 370.672,213.151 371.214,211.429 371.755,209.703 372.297,207.976 372.839,206.246 373.381,204.514 373.922,202.78 374.464,201.045 \n",
       "  375.006,199.308 375.547,197.57 376.089,195.831 376.631,194.091 377.173,192.35 377.714,190.608 378.256,188.866 378.798,187.123 379.339,185.381 379.881,183.638 \n",
       "  380.423,181.896 380.965,180.154 381.506,178.413 382.048,176.673 382.59,174.933 383.131,173.195 383.673,171.458 384.215,169.722 384.757,167.988 385.298,166.255 \n",
       "  385.84,164.525 386.382,162.797 386.923,161.071 387.465,159.348 388.007,157.627 388.549,155.909 389.09,154.194 389.632,152.482 390.174,150.773 390.715,149.068 \n",
       "  391.257,147.367 391.799,145.669 392.341,143.976 392.882,142.286 393.424,140.601 393.966,138.921 394.507,137.245 395.049,135.574 395.591,133.908 396.133,132.247 \n",
       "  396.674,130.591 397.216,128.941 397.758,127.297 398.299,125.659 398.841,124.026 399.383,122.4 399.925,120.78 400.466,119.167 401.008,117.56 401.55,115.96 \n",
       "  402.091,114.368 402.633,112.782 403.175,111.204 403.716,109.633 404.258,108.07 404.8,106.515 405.342,104.968 405.883,103.429 406.425,101.898 406.967,100.376 \n",
       "  407.508,98.8627 408.05,97.3578 408.592,95.8617 409.134,94.3746 409.675,92.8966 410.217,91.4279 410.759,89.9687 411.3,88.5191 411.842,87.0792 412.384,85.6492 \n",
       "  412.926,84.2293 413.467,82.8195 414.009,81.4201 414.551,80.0312 415.092,78.6529 415.634,77.2854 416.176,75.9287 416.718,74.5831 417.259,73.2487 417.801,71.9256 \n",
       "  418.343,70.6139 418.884,69.3138 419.426,68.0255 419.968,66.7489 420.51,65.4843 421.051,64.2319 421.593,62.9916 422.135,61.7637 422.676,60.5482 423.218,59.3453 \n",
       "  423.76,58.1551 424.302,56.9778 424.843,55.8134 425.385,54.662 425.927,53.5238 426.468,52.3989 427.01,51.2874 427.552,50.1894 428.094,49.105 428.635,48.0343 \n",
       "  429.177,46.9775 429.719,45.9346 430.26,44.9057 430.802,43.8909 431.344,42.8904 431.886,41.9042 432.427,40.9325 432.969,39.9752 433.511,39.0326 434.052,38.1047 \n",
       "  434.594,37.1917 435.136,36.2935 435.678,35.4103 436.219,34.5421 436.761,33.6892 437.303,32.8514 437.844,32.029 438.386,31.2221 438.928,30.4306 439.47,29.6546 \n",
       "  440.011,28.8944 440.553,28.1498 441.095,27.4211 441.636,26.7082 442.178,26.0113 442.72,25.3304 443.262,24.6655 443.803,24.0169 444.345,23.3844 444.887,22.7683 \n",
       "  445.428,22.1685 445.97,21.585 446.512,21.018 447.054,20.4674 447.595,19.9334 448.137,19.4158 448.679,18.9149 449.22,18.4307 449.762,17.9632 450.304,17.5124 \n",
       "  450.846,17.0785 451.387,16.6615 451.929,16.2614 452.471,15.8783 453.012,15.5122 453.554,15.1631 454.096,14.8312 454.638,14.5164 455.179,14.2187 455.721,13.9383 \n",
       "  456.263,13.675 456.804,13.4291 457.346,13.2005 457.888,12.9891 458.43,12.7951 458.971,12.6185 459.513,12.4593 460.055,12.3174 460.596,12.193 461.138,12.0861 \n",
       "  461.68,11.9966 462.222,11.9245 462.763,11.8699 463.305,11.8328 463.847,11.8132 464.388,11.811 464.93,11.8264 465.472,11.8592 466.013,11.9095 466.555,11.9773 \n",
       "  467.097,12.0626 467.639,12.1653 468.18,12.2855 468.722,12.4232 469.264,12.5783 469.805,12.7508 470.347,12.9407 470.889,13.148 471.431,13.3726 471.972,13.6146 \n",
       "  472.514,13.8738 473.056,14.1504 473.597,14.4442 474.139,14.7553 474.681,15.0835 475.223,15.4289 475.764,15.7915 476.306,16.1711 476.848,16.5677 477.389,16.9814 \n",
       "  477.931,17.412 478.473,17.8595 479.015,18.3239 479.556,18.8051 480.098,19.303 480.64,19.8177 481.181,20.3491 481.723,20.897 482.265,21.4614 482.807,22.0424 \n",
       "  483.348,22.6397 483.89,23.2534 484.432,23.8834 484.973,24.5296 485.515,25.192 486.057,25.8704 486.599,26.5648 487.14,27.2752 487.682,28.0014 488.224,28.7433 \n",
       "  488.765,29.501 489.307,30.2742 489.849,31.0629 490.391,31.8671 490.932,32.6866 491.474,33.5215 492.016,34.3716 492.557,35.2369 493.099,36.1172 493.641,37.0126 \n",
       "  494.183,37.9228 494.724,38.8478 495.266,39.7876 495.808,40.742 496.349,41.7109 496.891,42.6943 497.433,43.692 497.975,44.7039 498.516,45.7299 499.058,46.77 \n",
       "  499.6,47.824 500.141,48.8919 500.683,49.9734 501.225,51.0686 501.767,52.1773 502.308,53.2993 502.85,54.4347 503.392,55.5832 503.933,56.7448 504.475,57.9194 \n",
       "  505.017,59.1067 505.559,60.3068 506.1,61.5195 506.642,62.7447 507.184,63.9822 507.725,65.2319 508.267,66.4938 508.809,67.7676 509.351,69.0534 509.892,70.3508 \n",
       "  510.434,71.6599 510.976,72.9804 511.517,74.3123 512.059,75.6554 512.601,77.0096 513.143,78.3747 513.684,79.7506 514.226,81.1373 514.768,82.5344 515.309,83.942 \n",
       "  515.851,85.3598 516.393,86.7877 516.935,88.2256 517.476,89.6734 518.018,91.1308 518.56,92.5977 519.101,94.074 519.643,95.5596 520.185,97.0543 520.727,98.5579 \n",
       "  521.268,100.07 521.81,101.591 522.352,103.121 522.893,104.659 523.435,106.204 523.977,107.758 524.519,109.32 525.06,110.89 525.602,112.467 526.144,114.051 \n",
       "  526.685,115.642 527.227,117.241 527.769,118.846 528.311,120.458 528.852,122.077 529.394,123.702 529.936,125.333 530.477,126.97 531.019,128.612 531.561,130.261 \n",
       "  532.102,131.915 532.644,133.575 533.186,135.24 533.728,136.91 534.269,138.585 534.811,140.264 535.353,141.948 535.894,143.637 536.436,145.33 536.978,147.027 \n",
       "  537.52,148.728 538.061,150.432 538.603,152.14 539.145,153.852 539.686,155.566 540.228,157.284 540.77,159.004 541.312,160.727 541.853,162.453 542.395,164.181 \n",
       "  542.937,165.911 543.478,167.643 544.02,169.377 544.562,171.113 545.104,172.849 545.645,174.588 546.187,176.327 546.729,178.067 547.27,179.809 547.812,181.55 \n",
       "  548.354,183.292 548.896,185.035 549.437,186.777 549.979,188.52 550.521,190.262 551.062,192.003 551.604,193.745 552.146,195.485 552.688,197.224 553.229,198.963 \n",
       "  553.771,200.7 554.313,202.435 554.854,204.169 555.396,205.901 555.938,207.631 556.48,209.359 557.021,211.085 557.563,212.808 558.105,214.529 558.646,216.246 \n",
       "  559.188,217.961 559.73,219.673 560.272,221.381 560.813,223.086 561.355,224.787 561.897,226.484 562.438,228.177 562.98,229.866 563.522,231.551 564.064,233.231 \n",
       "  564.605,234.906 565.147,236.577 565.689,238.243 566.23,239.903 566.772,241.558 567.314,243.207 567.856,244.851 568.397,246.489 568.939,248.121 569.481,249.746 \n",
       "  570.022,251.365 570.564,252.978 571.106,254.584 571.648,256.183 572.189,257.775 572.731,259.36 573.273,260.937 573.814,262.507 574.356,264.069 574.898,265.623 \n",
       "  575.44,267.169 575.981,268.707 576.523,270.236 577.065,271.757 577.606,273.269 578.148,274.772 578.69,276.267 579.232,277.752 579.773,279.228 580.315,280.695 \n",
       "  \n",
       "  \"/>\n",
       "<polygon clip-path=\"url(#clip8300)\" points=\"\n",
       "485.201,78.051 562.315,78.051 562.315,32.691 485.201,32.691 \n",
       "  \" fill=\"#ffffff\" fill-opacity=\"1\"/>\n",
       "<polyline clip-path=\"url(#clip8300)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  485.201,78.051 562.315,78.051 562.315,32.691 485.201,32.691 485.201,78.051 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8300)\" style=\"stroke:#009af9; stroke-width:3; stroke-opacity:1; fill:none\" points=\"\n",
       "  491.201,47.811 527.201,47.811 \n",
       "  \"/>\n",
       "<g clip-path=\"url(#clip8300)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:start;\" transform=\"rotate(0, 533.201, 52.311)\" x=\"533.201\" y=\"52.311\">v(t)</text>\n",
       "</g>\n",
       "<polyline clip-path=\"url(#clip8300)\" style=\"stroke:#e26f46; stroke-width:3; stroke-opacity:1; fill:none\" points=\"\n",
       "  491.201,62.931 527.201,62.931 \n",
       "  \"/>\n",
       "<g clip-path=\"url(#clip8300)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:start;\" transform=\"rotate(0, 533.201, 67.431)\" x=\"533.201\" y=\"67.431\">x(t)</text>\n",
       "</g>\n",
       "</svg>\n"
      ]
     },
     "execution_count": 108,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "u0 = [1.,0.]\n",
    "harmonic! = @ode_def HarmonicOscillator begin\n",
    "   dv = -x\n",
    "   dx = v\n",
    "end\n",
    "tspan = (0.0,10.0)\n",
    "prob = ODEProblem(harmonic!,u0,tspan)\n",
    "sol = solve(prob)\n",
    "plot(sol)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let's instead stop the integration when a condition is met. From the [Integrator Interface stepping controls](http://docs.juliadiffeq.org/latest/basics/integrator.html#Stepping-Controls-1) we see that `terminate!(integrator)` will cause the integration to end. So our new `affect!` is simply:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 109,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "terminate_affect! (generic function with 1 method)"
      ]
     },
     "execution_count": 109,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "function terminate_affect!(integrator)\n",
    "    terminate!(integrator)\n",
    "end"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let's first stop the integration when the particle moves back to `x=0`. This means we want to use the condition:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 110,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "DiffEqBase.ContinuousCallback{#terminate_condition,#terminate_affect!,#terminate_affect!,DiffEqBase.#INITIALIZE_DEFAULT,Float64,Int64,Void}(terminate_condition, terminate_affect!, terminate_affect!, DiffEqBase.INITIALIZE_DEFAULT, nothing, true, 10, (true, true), 1.0e-9, 0)"
      ]
     },
     "execution_count": 110,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "function terminate_condition(u,t,integrator)\n",
    "    u[2]\n",
    "end\n",
    "terminate_cb = ContinuousCallback(terminate_condition,terminate_affect!)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Note that instead of adding callbacks to the problem, we can also add them to the `solve` command. This will automatically form a `CallbackSet` with any problem-related callbacks and naturally allows you to distinguish between model features and integration controls."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 111,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n",
       "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"600\" height=\"400\" viewBox=\"0 0 600 400\">\n",
       "<defs>\n",
       "  <clipPath id=\"clip8500\">\n",
       "    <rect x=\"0\" y=\"0\" width=\"600\" height=\"400\"/>\n",
       "  </clipPath>\n",
       "</defs>\n",
       "<polygon clip-path=\"url(#clip8500)\" points=\"\n",
       "0,400 600,400 600,0 0,0 \n",
       "  \" fill=\"#ffffff\" fill-opacity=\"1\"/>\n",
       "<defs>\n",
       "  <clipPath id=\"clip8501\">\n",
       "    <rect x=\"120\" y=\"0\" width=\"421\" height=\"400\"/>\n",
       "  </clipPath>\n",
       "</defs>\n",
       "<polygon clip-path=\"url(#clip8500)\" points=\"\n",
       "39.1436,360.065 580.315,360.065 580.315,11.811 39.1436,11.811 \n",
       "  \" fill=\"#ffffff\" fill-opacity=\"1\"/>\n",
       "<defs>\n",
       "  <clipPath id=\"clip8502\">\n",
       "    <rect x=\"39\" y=\"11\" width=\"542\" height=\"349\"/>\n",
       "  </clipPath>\n",
       "</defs>\n",
       "<polyline clip-path=\"url(#clip8502)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  39.1436,360.065 39.1436,11.811 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8502)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  211.404,360.065 211.404,11.811 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8502)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  383.664,360.065 383.664,11.811 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8502)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  555.925,360.065 555.925,11.811 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8502)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  39.1436,360.064 580.315,360.064 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8502)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  39.1436,273.001 580.315,273.001 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8502)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  39.1436,185.937 580.315,185.937 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8502)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  39.1436,98.8742 580.315,98.8742 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8502)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  39.1436,11.811 580.315,11.811 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8500)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  39.1436,360.065 580.315,360.065 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8500)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  39.1436,360.065 39.1436,11.811 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8500)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  39.1436,360.065 39.1436,354.842 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8500)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  211.404,360.065 211.404,354.842 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8500)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  383.664,360.065 383.664,354.842 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8500)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  555.925,360.065 555.925,354.842 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8500)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  39.1436,360.064 47.2612,360.064 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8500)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  39.1436,273.001 47.2612,273.001 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8500)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  39.1436,185.937 47.2612,185.937 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8500)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  39.1436,98.8742 47.2612,98.8742 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8500)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  39.1436,11.811 47.2612,11.811 \n",
       "  \"/>\n",
       "<g clip-path=\"url(#clip8500)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 39.1436, 373.865)\" x=\"39.1436\" y=\"373.865\">0</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip8500)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 211.404, 373.865)\" x=\"211.404\" y=\"373.865\">1</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip8500)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 383.664, 373.865)\" x=\"383.664\" y=\"373.865\">2</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip8500)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 555.925, 373.865)\" x=\"555.925\" y=\"373.865\">3</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip8500)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:end;\" transform=\"rotate(0, 33.1436, 364.564)\" x=\"33.1436\" y=\"364.564\">-1.0</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip8500)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:end;\" transform=\"rotate(0, 33.1436, 277.501)\" x=\"33.1436\" y=\"277.501\">-0.5</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip8500)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:end;\" transform=\"rotate(0, 33.1436, 190.437)\" x=\"33.1436\" y=\"190.437\">0.0</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip8500)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:end;\" transform=\"rotate(0, 33.1436, 103.374)\" x=\"33.1436\" y=\"103.374\">0.5</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip8500)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:end;\" transform=\"rotate(0, 33.1436, 16.311)\" x=\"33.1436\" y=\"16.311\">1.0</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip8500)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:16; text-anchor:middle;\" transform=\"rotate(0, 309.729, 397.6)\" x=\"309.729\" y=\"397.6\">t</text>\n",
       "</g>\n",
       "<polyline clip-path=\"url(#clip8502)\" style=\"stroke:#009af9; stroke-width:3; stroke-opacity:1; fill:none\" points=\"\n",
       "  39.1436,11.811 39.6853,11.8119 40.227,11.8145 40.7687,11.8188 41.3104,11.8248 41.8522,11.8325 42.3939,11.842 42.9356,11.8532 43.4773,11.8661 44.019,11.8808 \n",
       "  44.5607,11.8971 45.1024,11.9152 45.6441,11.935 46.1859,11.9565 46.7276,11.9798 47.2693,12.0047 47.811,12.0314 48.3527,12.0598 48.8944,12.0899 49.4361,12.1218 \n",
       "  49.9778,12.1553 50.5196,12.1906 51.0613,12.2276 51.603,12.2663 52.1447,12.3067 52.6864,12.3489 53.2281,12.3927 53.7698,12.4383 54.3116,12.4856 54.8533,12.5346 \n",
       "  55.395,12.5853 55.9367,12.6378 56.4784,12.6919 57.0201,12.7478 57.5618,12.8054 58.1035,12.8647 58.6453,12.9257 59.187,12.9884 59.7287,13.0528 60.2704,13.119 \n",
       "  60.8121,13.1868 61.3538,13.2564 61.8955,13.3276 62.4372,13.4006 62.979,13.4753 63.5207,13.5516 64.0624,13.6297 64.6041,13.7095 65.1458,13.791 65.6875,13.8742 \n",
       "  66.2292,13.9591 66.771,14.0457 67.3127,14.134 67.8544,14.224 68.3961,14.3157 68.9378,14.4091 69.4795,14.5041 70.0212,14.6009 70.5629,14.6994 71.1047,14.7996 \n",
       "  71.6464,14.9014 72.1881,15.005 72.7298,15.1102 73.2715,15.2172 73.8132,15.3258 74.3549,15.4361 74.8967,15.5481 75.4384,15.6618 75.9801,15.7771 76.5218,15.8942 \n",
       "  77.0635,16.0129 77.6052,16.1333 78.1469,16.2554 78.6886,16.3792 79.2304,16.5046 79.7721,16.6317 80.3138,16.7605 80.8555,16.891 81.3972,17.0231 81.9389,17.1569 \n",
       "  82.4806,17.2924 83.0223,17.4296 83.5641,17.5684 84.1058,17.7088 84.6475,17.851 85.1892,17.9948 85.7309,18.1403 86.2726,18.2874 86.8143,18.4362 87.3561,18.5866 \n",
       "  87.8978,18.7387 88.4395,18.8924 88.9812,19.0478 89.5229,19.2049 90.0646,19.3636 90.6063,19.5239 91.148,19.6859 91.6898,19.8495 92.2315,20.0148 92.7732,20.1817 \n",
       "  93.3149,20.3503 93.8566,20.5205 94.3983,20.6923 94.94,20.8658 95.4817,21.0409 96.0235,21.2176 96.5652,21.396 97.1069,21.5759 97.6486,21.7575 98.1903,21.9408 \n",
       "  98.732,22.1256 99.2737,22.3121 99.8155,22.5002 100.357,22.6899 100.899,22.8812 101.441,23.0742 101.982,23.2687 102.524,23.4649 103.066,23.6626 103.607,23.862 \n",
       "  104.149,24.063 104.691,24.2655 105.233,24.4697 105.774,24.6755 106.316,24.8828 106.858,25.0918 107.399,25.3023 107.941,25.5145 108.483,25.7282 109.025,25.9435 \n",
       "  109.566,26.1604 110.108,26.3788 110.65,26.5989 111.191,26.8205 111.733,27.0437 112.275,27.2685 112.817,27.4948 113.358,27.7227 113.9,27.9522 114.442,28.1832 \n",
       "  114.983,28.4158 115.525,28.6499 116.067,28.8856 116.609,29.1229 117.15,29.3617 117.692,29.602 118.234,29.8439 118.775,30.0874 119.317,30.3324 119.859,30.5789 \n",
       "  120.401,30.8269 120.942,31.0765 121.484,31.3277 122.026,31.5803 122.567,31.8345 123.109,32.0902 123.651,32.3474 124.193,32.6062 124.734,32.8664 125.276,33.1282 \n",
       "  125.818,33.3915 126.359,33.6563 126.901,33.9226 127.443,34.1904 127.985,34.4597 128.526,34.7305 129.068,35.0028 129.61,35.2766 130.151,35.5519 130.693,35.8286 \n",
       "  131.235,36.1069 131.777,36.3866 132.318,36.6678 132.86,36.9505 133.402,37.2347 133.943,37.5203 134.485,37.8074 135.027,38.096 135.569,38.386 136.11,38.6775 \n",
       "  136.652,38.9704 137.194,39.2648 137.735,39.5607 138.277,39.858 138.819,40.1567 139.361,40.4569 139.902,40.7585 140.444,41.0616 140.986,41.366 141.527,41.672 \n",
       "  142.069,41.9793 142.611,42.2881 143.152,42.5983 143.694,42.9099 144.236,43.2229 144.778,43.5373 145.319,43.8531 145.861,44.1704 146.403,44.489 146.944,44.8091 \n",
       "  147.486,45.1305 148.028,45.4534 148.57,45.7776 149.111,46.1032 149.653,46.4302 150.195,46.7585 150.736,47.0883 151.278,47.4194 151.82,47.7519 152.362,48.0858 \n",
       "  152.903,48.421 153.445,48.7576 153.987,49.0955 154.528,49.4348 155.07,49.7754 155.612,50.1174 156.154,50.4607 156.695,50.8054 157.237,51.1514 157.779,51.4988 \n",
       "  158.32,51.8474 158.862,52.1974 159.404,52.5488 159.946,52.9014 160.487,53.2553 161.029,53.6106 161.571,53.9672 162.112,54.3251 162.654,54.6842 163.196,55.0447 \n",
       "  163.738,55.4065 164.279,55.7696 164.821,56.1339 165.363,56.4996 165.904,56.8665 166.446,57.2347 166.988,57.6041 167.53,57.9749 168.071,58.3469 168.613,58.7201 \n",
       "  169.155,59.0947 169.696,59.4704 170.238,59.8475 170.78,60.2257 171.322,60.6052 171.863,60.986 172.405,61.368 172.947,61.7512 173.488,62.1357 174.03,62.5213 \n",
       "  174.572,62.9082 175.114,63.2963 175.655,63.6857 176.197,64.0762 176.739,64.4679 177.28,64.8609 177.822,65.255 178.364,65.6503 178.906,66.0469 179.447,66.4446 \n",
       "  179.989,66.8435 180.531,67.2435 181.072,67.6448 181.614,68.0472 182.156,68.4507 182.698,68.8555 183.239,69.2614 183.781,69.6684 184.323,70.0766 184.864,70.486 \n",
       "  185.406,70.8965 185.948,71.3081 186.49,71.7208 187.031,72.1347 187.573,72.5497 188.115,72.9659 188.656,73.3831 189.198,73.8015 189.74,74.2209 190.282,74.6415 \n",
       "  190.823,75.0632 191.365,75.486 191.907,75.9098 192.448,76.3348 192.99,76.7608 193.532,77.1879 194.074,77.6161 194.615,78.0454 195.157,78.4757 195.699,78.9071 \n",
       "  196.24,79.3396 196.782,79.7731 197.324,80.2076 197.866,80.6432 198.407,81.0798 198.949,81.5175 199.491,81.9562 200.032,82.396 200.574,82.8367 201.116,83.2785 \n",
       "  201.658,83.7213 202.199,84.1651 202.741,84.6099 203.283,85.0557 203.824,85.5025 204.366,85.9504 204.908,86.3991 205.45,86.8489 205.991,87.2997 206.533,87.7514 \n",
       "  207.075,88.2041 207.616,88.6578 208.158,89.1124 208.7,89.568 209.241,90.0246 209.783,90.482 210.325,90.9405 210.867,91.3999 211.408,91.8602 211.95,92.3214 \n",
       "  212.492,92.7836 213.033,93.2467 213.575,93.7107 214.117,94.1756 214.659,94.6414 215.2,95.1082 215.742,95.5758 216.284,96.0443 216.825,96.5137 217.367,96.984 \n",
       "  217.909,97.4552 218.451,97.9272 218.992,98.4002 219.534,98.8739 220.076,99.3486 220.617,99.8241 221.159,100.3 221.701,100.778 222.243,101.256 222.784,101.735 \n",
       "  223.326,102.214 223.868,102.695 224.409,103.176 224.951,103.658 225.493,104.141 226.035,104.625 226.576,105.11 227.118,105.595 227.66,106.081 228.201,106.568 \n",
       "  228.743,107.056 229.285,107.545 229.827,108.034 230.368,108.524 230.91,109.015 231.452,109.507 231.993,109.999 232.535,110.492 233.077,110.986 233.619,111.481 \n",
       "  234.16,111.976 234.702,112.472 235.244,112.969 235.785,113.467 236.327,113.965 236.869,114.464 237.411,114.964 237.952,115.464 238.494,115.965 239.036,116.467 \n",
       "  239.577,116.969 240.119,117.472 240.661,117.976 241.203,118.481 241.744,118.986 242.286,119.492 242.828,119.998 243.369,120.505 243.911,121.013 244.453,121.522 \n",
       "  244.995,122.031 245.536,122.54 246.078,123.051 246.62,123.562 247.161,124.073 247.703,124.585 248.245,125.098 248.787,125.611 249.328,126.125 249.87,126.64 \n",
       "  250.412,127.155 250.953,127.671 251.495,128.187 252.037,128.704 252.579,129.222 253.12,129.74 253.662,130.258 254.204,130.777 254.745,131.297 255.287,131.817 \n",
       "  255.829,132.338 256.371,132.859 256.912,133.381 257.454,133.903 257.996,134.426 258.537,134.949 259.079,135.473 259.621,135.997 260.163,136.522 260.704,137.048 \n",
       "  261.246,137.573 261.788,138.1 262.329,138.626 262.871,139.154 263.413,139.681 263.955,140.209 264.496,140.738 265.038,141.267 265.58,141.797 266.121,142.326 \n",
       "  266.663,142.857 267.205,143.388 267.747,143.919 268.288,144.45 268.83,144.982 269.372,145.515 269.913,146.048 270.455,146.581 270.997,147.114 271.539,147.648 \n",
       "  272.08,148.183 272.622,148.717 273.164,149.253 273.705,149.788 274.247,150.324 274.789,150.86 275.33,151.397 275.872,151.933 276.414,152.471 276.956,153.008 \n",
       "  277.497,153.546 278.039,154.084 278.581,154.623 279.122,155.161 279.664,155.701 280.206,156.24 280.748,156.78 281.289,157.32 281.831,157.86 282.373,158.4 \n",
       "  282.914,158.941 283.456,159.482 283.998,160.024 284.54,160.565 285.081,161.107 285.623,161.649 286.165,162.192 286.706,162.734 287.248,163.277 287.79,163.82 \n",
       "  288.332,164.363 288.873,164.907 289.415,165.45 289.957,165.994 290.498,166.538 291.04,167.083 291.582,167.627 292.124,168.172 292.665,168.716 293.207,169.261 \n",
       "  293.749,169.807 294.29,170.352 294.832,170.897 295.374,171.443 295.916,171.989 296.457,172.535 296.999,173.081 297.541,173.627 298.082,174.173 298.624,174.719 \n",
       "  299.166,175.266 299.708,175.813 300.249,176.359 300.791,176.906 301.333,177.453 301.874,178 302.416,178.547 302.958,179.094 303.5,179.641 304.041,180.189 \n",
       "  304.583,180.736 305.125,181.283 305.666,181.831 306.208,182.378 306.75,182.926 307.292,183.473 307.833,184.021 308.375,184.568 308.917,185.116 309.458,185.663 \n",
       "  310,186.211 310.542,186.759 311.084,187.306 311.625,187.854 312.167,188.401 312.709,188.949 313.25,189.496 313.792,190.044 314.334,190.591 314.876,191.139 \n",
       "  315.417,191.686 315.959,192.233 316.501,192.78 317.042,193.327 317.584,193.875 318.126,194.422 318.668,194.968 319.209,195.515 319.751,196.062 320.293,196.609 \n",
       "  320.834,197.155 321.376,197.701 321.918,198.248 322.46,198.794 323.001,199.34 323.543,199.886 324.085,200.432 324.626,200.977 325.168,201.523 325.71,202.068 \n",
       "  326.252,202.613 326.793,203.158 327.335,203.703 327.877,204.248 328.418,204.792 328.96,205.336 329.502,205.88 330.044,206.424 330.585,206.968 331.127,207.511 \n",
       "  331.669,208.055 332.21,208.598 332.752,209.141 333.294,209.683 333.836,210.226 334.377,210.768 334.919,211.31 335.461,211.851 336.002,212.393 336.544,212.934 \n",
       "  337.086,213.475 337.627,214.015 338.169,214.555 338.711,215.095 339.253,215.635 339.794,216.175 340.336,216.714 340.878,217.252 341.419,217.791 341.961,218.329 \n",
       "  342.503,218.867 343.045,219.405 343.586,219.942 344.128,220.479 344.67,221.015 345.211,221.551 345.753,222.087 346.295,222.623 346.837,223.158 347.378,223.693 \n",
       "  347.92,224.227 348.462,224.761 349.003,225.294 349.545,225.828 350.087,226.361 350.629,226.893 351.17,227.425 351.712,227.957 352.254,228.488 352.795,229.018 \n",
       "  353.337,229.549 353.879,230.079 354.421,230.608 354.962,231.137 355.504,231.666 356.046,232.194 356.587,232.722 357.129,233.249 357.671,233.776 358.213,234.302 \n",
       "  358.754,234.828 359.296,235.353 359.838,235.878 360.379,236.402 360.921,236.926 361.463,237.449 362.005,237.972 362.546,238.494 363.088,239.016 363.63,239.537 \n",
       "  364.171,240.058 364.713,240.578 365.255,241.098 365.797,241.617 366.338,242.135 366.88,242.653 367.422,243.171 367.963,243.688 368.505,244.204 369.047,244.72 \n",
       "  369.589,245.235 370.13,245.749 370.672,246.263 371.214,246.777 371.755,247.289 372.297,247.802 372.839,248.313 373.381,248.824 373.922,249.334 374.464,249.844 \n",
       "  375.006,250.353 375.547,250.861 376.089,251.369 376.631,251.876 377.173,252.383 377.714,252.889 378.256,253.394 378.798,253.898 379.339,254.402 379.881,254.905 \n",
       "  380.423,255.408 380.965,255.909 381.506,256.411 382.048,256.911 382.59,257.411 383.131,257.91 383.673,258.408 384.215,258.905 384.757,259.402 385.298,259.898 \n",
       "  385.84,260.394 386.382,260.888 386.923,261.382 387.465,261.875 388.007,262.368 388.549,262.859 389.09,263.35 389.632,263.84 390.174,264.33 390.715,264.818 \n",
       "  391.257,265.306 391.799,265.793 392.341,266.279 392.882,266.765 393.424,267.249 393.966,267.733 394.507,268.216 395.049,268.698 395.591,269.18 396.133,269.66 \n",
       "  396.674,270.14 397.216,270.619 397.758,271.097 398.299,271.574 398.841,272.05 399.383,272.526 399.925,273.001 400.466,273.474 401.008,273.947 401.55,274.419 \n",
       "  402.091,274.891 402.633,275.361 403.175,275.83 403.716,276.299 404.258,276.766 404.8,277.233 405.342,277.699 405.883,278.164 406.425,278.628 406.967,279.091 \n",
       "  407.508,279.553 408.05,280.015 408.592,280.475 409.134,280.934 409.675,281.393 410.217,281.85 410.759,282.307 411.3,282.763 411.842,283.217 412.384,283.671 \n",
       "  412.926,284.124 413.467,284.575 414.009,285.026 414.551,285.476 415.092,285.925 415.634,286.373 416.176,286.82 416.718,287.265 417.259,287.71 417.801,288.154 \n",
       "  418.343,288.597 418.884,289.039 419.426,289.48 419.968,289.919 420.51,290.358 421.051,290.796 421.593,291.233 422.135,291.668 422.676,292.103 423.218,292.536 \n",
       "  423.76,292.969 424.302,293.4 424.843,293.831 425.385,294.26 425.927,294.688 426.468,295.115 427.01,295.541 427.552,295.966 428.094,296.39 428.635,296.813 \n",
       "  429.177,297.235 429.719,297.655 430.26,298.075 430.802,298.493 431.344,298.91 431.886,299.326 432.427,299.742 432.969,300.155 433.511,300.568 434.052,300.98 \n",
       "  434.594,301.39 435.136,301.8 435.678,302.208 436.219,302.615 436.761,303.021 437.303,303.426 437.844,303.829 438.386,304.232 438.928,304.633 439.47,305.033 \n",
       "  440.011,305.432 440.553,305.829 441.095,306.226 441.636,306.621 442.178,307.015 442.72,307.408 443.262,307.8 443.803,308.191 444.345,308.58 444.887,308.968 \n",
       "  445.428,309.355 445.97,309.741 446.512,310.125 447.054,310.508 447.595,310.89 448.137,311.271 448.679,311.65 449.22,312.029 449.762,312.406 450.304,312.781 \n",
       "  450.846,313.156 451.387,313.529 451.929,313.901 452.471,314.272 453.012,314.641 453.554,315.009 454.096,315.376 454.638,315.742 455.179,316.106 455.721,316.469 \n",
       "  456.263,316.831 456.804,317.192 457.346,317.551 457.888,317.909 458.43,318.265 458.971,318.62 459.513,318.974 460.055,319.327 460.596,319.678 461.138,320.028 \n",
       "  461.68,320.377 462.222,320.724 462.763,321.07 463.305,321.415 463.847,321.758 464.388,322.1 464.93,322.441 465.472,322.78 466.013,323.118 466.555,323.454 \n",
       "  467.097,323.79 467.639,324.124 468.18,324.456 468.722,324.787 469.264,325.117 469.805,325.445 470.347,325.772 470.889,326.098 471.431,326.422 471.972,326.745 \n",
       "  472.514,327.066 473.056,327.386 473.597,327.705 474.139,328.022 474.681,328.338 475.223,328.652 475.764,328.965 476.306,329.277 476.848,329.587 477.389,329.896 \n",
       "  477.931,330.203 478.473,330.509 479.015,330.814 479.556,331.117 480.098,331.418 480.64,331.718 481.181,332.017 481.723,332.314 482.265,332.61 482.807,332.905 \n",
       "  483.348,333.198 483.89,333.489 484.432,333.779 484.973,334.068 485.515,334.355 486.057,334.64 486.599,334.925 487.14,335.207 487.682,335.488 488.224,335.768 \n",
       "  488.765,336.046 489.307,336.323 489.849,336.598 490.391,336.872 490.932,337.145 491.474,337.415 492.016,337.685 492.557,337.952 493.099,338.219 493.641,338.484 \n",
       "  494.183,338.747 494.724,339.009 495.266,339.269 495.808,339.528 496.349,339.785 496.891,340.041 497.433,340.295 497.975,340.547 498.516,340.799 499.058,341.048 \n",
       "  499.6,341.296 500.141,341.543 500.683,341.788 501.225,342.031 501.767,342.273 502.308,342.513 502.85,342.752 503.392,342.99 503.933,343.225 504.475,343.459 \n",
       "  505.017,343.692 505.559,343.923 506.1,344.153 506.642,344.38 507.184,344.607 507.725,344.832 508.267,345.055 508.809,345.276 509.351,345.497 509.892,345.715 \n",
       "  510.434,345.932 510.976,346.147 511.517,346.361 512.059,346.573 512.601,346.784 513.143,346.993 513.684,347.2 514.226,347.406 514.768,347.61 515.309,347.813 \n",
       "  515.851,348.014 516.393,348.213 516.935,348.411 517.476,348.607 518.018,348.801 518.56,348.994 519.101,349.186 519.643,349.376 520.185,349.564 520.727,349.75 \n",
       "  521.268,349.935 521.81,350.118 522.352,350.3 522.893,350.48 523.435,350.658 523.977,350.835 524.519,351.01 525.06,351.184 525.602,351.355 526.144,351.526 \n",
       "  526.685,351.694 527.227,351.861 527.769,352.026 528.311,352.19 528.852,352.352 529.394,352.512 529.936,352.671 530.477,352.828 531.019,352.983 531.561,353.137 \n",
       "  532.102,353.289 532.644,353.44 533.186,353.589 533.728,353.736 534.269,353.881 534.811,354.025 535.353,354.167 535.894,354.308 536.436,354.446 536.978,354.583 \n",
       "  537.52,354.719 538.061,354.853 538.603,354.985 539.145,355.115 539.686,355.244 540.228,355.371 540.77,355.497 541.312,355.62 541.853,355.743 542.395,355.863 \n",
       "  542.937,355.982 543.478,356.099 544.02,356.214 544.562,356.328 545.104,356.44 545.645,356.55 546.187,356.659 546.729,356.765 547.27,356.871 547.812,356.974 \n",
       "  548.354,357.076 548.896,357.176 549.437,357.275 549.979,357.371 550.521,357.467 551.062,357.56 551.604,357.652 552.146,357.742 552.688,357.83 553.229,357.916 \n",
       "  553.771,358.001 554.313,358.084 554.854,358.166 555.396,358.246 555.938,358.324 556.48,358.4 557.021,358.475 557.563,358.548 558.105,358.619 558.646,358.689 \n",
       "  559.188,358.756 559.73,358.822 560.272,358.887 560.813,358.95 561.355,359.011 561.897,359.07 562.438,359.127 562.98,359.183 563.522,359.237 564.064,359.29 \n",
       "  564.605,359.34 565.147,359.389 565.689,359.437 566.23,359.482 566.772,359.526 567.314,359.568 567.856,359.609 568.397,359.647 568.939,359.684 569.481,359.72 \n",
       "  570.022,359.753 570.564,359.785 571.106,359.815 571.648,359.843 572.189,359.87 572.731,359.895 573.273,359.918 573.814,359.94 574.356,359.96 574.898,359.978 \n",
       "  575.44,359.994 575.981,360.009 576.523,360.022 577.065,360.033 577.606,360.042 578.148,360.05 578.69,360.056 579.232,360.06 579.773,360.063 580.315,360.065 \n",
       "  \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8502)\" style=\"stroke:#e26f46; stroke-width:3; stroke-opacity:1; fill:none\" points=\"\n",
       "  39.1436,185.937 39.6853,185.39 40.227,184.842 40.7687,184.295 41.3104,183.747 41.8522,183.2 42.3939,182.652 42.9356,182.105 43.4773,181.557 44.019,181.01 \n",
       "  44.5607,180.462 45.1024,179.915 45.6441,179.368 46.1859,178.821 46.7276,178.274 47.2693,177.727 47.811,177.18 48.3527,176.633 48.8944,176.086 49.4361,175.54 \n",
       "  49.9778,174.993 50.5196,174.447 51.0613,173.9 51.603,173.354 52.1447,172.808 52.6864,172.262 53.2281,171.716 53.7698,171.17 54.3116,170.625 54.8533,170.08 \n",
       "  55.395,169.534 55.9367,168.989 56.4784,168.444 57.0201,167.9 57.5618,167.355 58.1035,166.811 58.6453,166.267 59.187,165.723 59.7287,165.179 60.2704,164.635 \n",
       "  60.8121,164.092 61.3538,163.549 61.8955,163.006 62.4372,162.463 62.979,161.921 63.5207,161.378 64.0624,160.836 64.6041,160.295 65.1458,159.753 65.6875,159.212 \n",
       "  66.2292,158.671 66.771,158.13 67.3127,157.59 67.8544,157.05 68.3961,156.51 68.9378,155.97 69.4795,155.431 70.0212,154.892 70.5629,154.353 71.1047,153.815 \n",
       "  71.6464,153.277 72.1881,152.739 72.7298,152.202 73.2715,151.665 73.8132,151.128 74.3549,150.592 74.8967,150.056 75.4384,149.52 75.9801,148.985 76.5218,148.45 \n",
       "  77.0635,147.915 77.6052,147.381 78.1469,146.848 78.6886,146.314 79.2304,145.781 79.7721,145.248 80.3138,144.716 80.8555,144.184 81.3972,143.653 81.9389,143.122 \n",
       "  82.4806,142.592 83.0223,142.061 83.5641,141.532 84.1058,141.002 84.6475,140.474 85.1892,139.945 85.7309,139.417 86.2726,138.89 86.8143,138.363 87.3561,137.836 \n",
       "  87.8978,137.31 88.4395,136.785 88.9812,136.26 89.5229,135.735 90.0646,135.211 90.6063,134.687 91.148,134.164 91.6898,133.642 92.2315,133.12 92.7732,132.598 \n",
       "  93.3149,132.077 93.8566,131.557 94.3983,131.037 94.94,130.518 95.4817,129.999 96.0235,129.48 96.5652,128.963 97.1069,128.446 97.6486,127.929 98.1903,127.413 \n",
       "  98.732,126.898 99.2737,126.383 99.8155,125.868 100.357,125.355 100.899,124.842 101.441,124.329 101.982,123.817 102.524,123.306 103.066,122.795 103.607,122.285 \n",
       "  104.149,121.776 104.691,121.267 105.233,120.759 105.774,120.252 106.316,119.745 106.858,119.239 107.399,118.733 107.941,118.229 108.483,117.724 109.025,117.221 \n",
       "  109.566,116.718 110.108,116.216 110.65,115.715 111.191,115.214 111.733,114.714 112.275,114.215 112.817,113.716 113.358,113.218 113.9,112.721 114.442,112.224 \n",
       "  114.983,111.729 115.525,111.234 116.067,110.739 116.609,110.246 117.15,109.753 117.692,109.261 118.234,108.77 118.775,108.279 119.317,107.79 119.859,107.301 \n",
       "  120.401,106.813 120.942,106.325 121.484,105.839 122.026,105.353 122.567,104.868 123.109,104.384 123.651,103.9 124.193,103.418 124.734,102.936 125.276,102.455 \n",
       "  125.818,101.975 126.359,101.495 126.901,101.017 127.443,100.539 127.985,100.062 128.526,99.5865 129.068,99.1114 129.61,98.6372 130.151,98.1639 130.693,97.6914 \n",
       "  131.235,97.2198 131.777,96.749 132.318,96.2792 132.86,95.8102 133.402,95.3421 133.943,94.8749 134.485,94.4086 135.027,93.9433 135.569,93.4788 136.11,93.0152 \n",
       "  136.652,92.5526 137.194,92.0909 137.735,91.6301 138.277,91.1703 138.819,90.7113 139.361,90.2534 139.902,89.7963 140.444,89.3403 140.986,88.8852 141.527,88.431 \n",
       "  142.069,87.9778 142.611,87.5256 143.152,87.0743 143.694,86.6241 144.236,86.1748 144.778,85.7265 145.319,85.2791 145.861,84.8328 146.403,84.3875 146.944,83.9432 \n",
       "  147.486,83.4999 148.028,83.0576 148.57,82.6163 149.111,82.1761 149.653,81.7369 150.195,81.2987 150.736,80.8615 151.278,80.4254 151.82,79.9903 152.362,79.5563 \n",
       "  152.903,79.1233 153.445,78.6914 153.987,78.2605 154.528,77.8307 155.07,77.402 155.612,76.9743 156.154,76.5478 156.695,76.1223 157.237,75.6979 157.779,75.2745 \n",
       "  158.32,74.8523 158.862,74.4312 159.404,74.0112 159.946,73.5922 160.487,73.1744 161.029,72.7578 161.571,72.3422 162.112,71.9277 162.654,71.5144 163.196,71.1022 \n",
       "  163.738,70.6912 164.279,70.2813 164.821,69.8725 165.363,69.4649 165.904,69.0584 166.446,68.6531 166.988,68.2489 167.53,67.8459 168.071,67.4441 168.613,67.0435 \n",
       "  169.155,66.644 169.696,66.2457 170.238,65.8486 170.78,65.4527 171.322,65.0579 171.863,64.6644 172.405,64.272 172.947,63.8809 173.488,63.491 174.03,63.1023 \n",
       "  174.572,62.7148 175.114,62.3285 175.655,61.9434 176.197,61.5596 176.739,61.177 177.28,60.7956 177.822,60.4154 178.364,60.0366 178.906,59.6589 179.447,59.2825 \n",
       "  179.989,58.9073 180.531,58.5334 181.072,58.1608 181.614,57.7894 182.156,57.4193 182.698,57.0505 183.239,56.6829 183.781,56.3166 184.323,55.9516 184.864,55.5879 \n",
       "  185.406,55.2255 185.948,54.8644 186.49,54.5045 187.031,54.146 187.573,53.7887 188.115,53.4328 188.656,53.0782 189.198,52.7249 189.74,52.3729 190.282,52.0222 \n",
       "  190.823,51.6729 191.365,51.3249 191.907,50.9782 192.448,50.6329 192.99,50.2889 193.532,49.9462 194.074,49.6049 194.615,49.2649 195.157,48.9263 195.699,48.589 \n",
       "  196.24,48.2531 196.782,47.9186 197.324,47.5854 197.866,47.2536 198.407,46.9231 198.949,46.5941 199.491,46.2664 200.032,45.9401 200.574,45.6152 201.116,45.2916 \n",
       "  201.658,44.9695 202.199,44.6488 202.741,44.3294 203.283,44.0115 203.824,43.6949 204.366,43.3798 204.908,43.0661 205.45,42.7537 205.991,42.4428 206.533,42.1334 \n",
       "  207.075,41.8253 207.616,41.5187 208.158,41.2135 208.7,40.9097 209.241,40.6074 209.783,40.3065 210.325,40.007 210.867,39.709 211.408,39.4125 211.95,39.1173 \n",
       "  212.492,38.8237 213.033,38.5315 213.575,38.2407 214.117,37.9514 214.659,37.6636 215.2,37.3772 215.742,37.0923 216.284,36.8089 216.825,36.527 217.367,36.2465 \n",
       "  217.909,35.9675 218.451,35.69 218.992,35.414 219.534,35.1395 220.076,34.8664 220.617,34.5949 221.159,34.3248 221.701,34.0563 222.243,33.7892 222.784,33.5237 \n",
       "  223.326,33.2596 223.868,32.9971 224.409,32.7361 224.951,32.4766 225.493,32.2186 226.035,31.9622 226.576,31.7072 227.118,31.4538 227.66,31.2019 228.201,30.9516 \n",
       "  228.743,30.7028 229.285,30.4555 229.827,30.2097 230.368,29.9655 230.91,29.7228 231.452,29.4817 231.993,29.2421 232.535,29.0041 233.077,28.7676 233.619,28.5327 \n",
       "  234.16,28.2993 234.702,28.0675 235.244,27.8373 235.785,27.6086 236.327,27.3815 236.869,27.1559 237.411,26.932 237.952,26.7096 238.494,26.4887 239.036,26.2695 \n",
       "  239.577,26.0518 240.119,25.8357 240.661,25.6212 241.203,25.4083 241.744,25.1969 242.286,24.9872 242.828,24.779 243.369,24.5725 243.911,24.3675 244.453,24.1641 \n",
       "  244.995,23.9623 245.536,23.7622 246.078,23.5636 246.62,23.3666 247.161,23.1713 247.703,22.9775 248.245,22.7854 248.787,22.5948 249.328,22.4059 249.87,22.2186 \n",
       "  250.412,22.033 250.953,21.8489 251.495,21.6665 252.037,21.4857 252.579,21.3065 253.12,21.1289 253.662,20.953 254.204,20.7787 254.745,20.606 255.287,20.435 \n",
       "  255.829,20.2656 256.371,20.0979 256.912,19.9317 257.454,19.7673 257.996,19.6044 258.537,19.4433 259.079,19.2837 259.621,19.1258 260.163,18.9696 260.704,18.815 \n",
       "  261.246,18.6621 261.788,18.5108 262.329,18.3612 262.871,18.2132 263.413,18.0669 263.955,17.9223 264.496,17.7793 265.038,17.638 265.58,17.4983 266.121,17.3603 \n",
       "  266.663,17.224 267.205,17.0893 267.747,16.9564 268.288,16.825 268.83,16.6954 269.372,16.5674 269.913,16.4412 270.455,16.3165 270.997,16.1936 271.539,16.0724 \n",
       "  272.08,15.9528 272.622,15.8349 273.164,15.7187 273.705,15.6041 274.247,15.4913 274.789,15.3801 275.33,15.2707 275.872,15.1629 276.414,15.0568 276.956,14.9524 \n",
       "  277.497,14.8497 278.039,14.7487 278.581,14.6494 279.122,14.5517 279.664,14.4558 280.206,14.3616 280.748,14.269 281.289,14.1782 281.831,14.089 282.373,14.0016 \n",
       "  282.914,13.9158 283.456,13.8318 283.998,13.7495 284.54,13.6688 285.081,13.5899 285.623,13.5127 286.165,13.4372 286.706,13.3633 287.248,13.2912 287.79,13.2208 \n",
       "  288.332,13.1521 288.873,13.0852 289.415,13.0199 289.957,12.9563 290.498,12.8945 291.04,12.8343 291.582,12.7759 292.124,12.7192 292.665,12.6642 293.207,12.6109 \n",
       "  293.749,12.5593 294.29,12.5095 294.832,12.4613 295.374,12.4149 295.916,12.3702 296.457,12.3272 296.999,12.2859 297.541,12.2464 298.082,12.2085 298.624,12.1724 \n",
       "  299.166,12.138 299.708,12.1053 300.249,12.0743 300.791,12.0451 301.333,12.0176 301.874,11.9918 302.416,11.9677 302.958,11.9453 303.5,11.9247 304.041,11.9057 \n",
       "  304.583,11.8885 305.125,11.873 305.666,11.8593 306.208,11.8472 306.75,11.8369 307.292,11.8283 307.833,11.8214 308.375,11.8163 308.917,11.8129 309.458,11.8111 \n",
       "  310,11.8112 310.542,11.8129 311.084,11.8163 311.625,11.8215 312.167,11.8284 312.709,11.837 313.25,11.8474 313.792,11.8594 314.334,11.8732 314.876,11.8887 \n",
       "  315.417,11.9059 315.959,11.9249 316.501,11.9455 317.042,11.9679 317.584,11.992 318.126,12.0179 318.668,12.0454 319.209,12.0747 319.751,12.1056 320.293,12.1383 \n",
       "  320.834,12.1728 321.376,12.2089 321.918,12.2467 322.46,12.2863 323.001,12.3276 323.543,12.3706 324.085,12.4153 324.626,12.4617 325.168,12.5099 325.71,12.5598 \n",
       "  326.252,12.6113 326.793,12.6646 327.335,12.7196 327.877,12.7763 328.418,12.8348 328.96,12.8949 329.502,12.9568 330.044,13.0203 330.585,13.0856 331.127,13.1526 \n",
       "  331.669,13.2213 332.21,13.2916 332.752,13.3638 333.294,13.4376 333.836,13.5131 334.377,13.5903 334.919,13.6692 335.461,13.7498 336.002,13.8322 336.544,13.9162 \n",
       "  337.086,14.0019 337.627,14.0894 338.169,14.1785 338.711,14.2693 339.253,14.3619 339.794,14.4561 340.336,14.552 340.878,14.6496 341.419,14.7489 341.961,14.8499 \n",
       "  342.503,14.9526 343.045,15.057 343.586,15.1631 344.128,15.2708 344.67,15.3803 345.211,15.4914 345.753,15.6043 346.295,15.7188 346.837,15.835 347.378,15.9528 \n",
       "  347.92,16.0724 348.462,16.1936 349.003,16.3165 349.545,16.4411 350.087,16.5674 350.629,16.6953 351.17,16.825 351.712,16.9563 352.254,17.0892 352.795,17.2238 \n",
       "  353.337,17.3601 353.879,17.4981 354.421,17.6378 354.962,17.7791 355.504,17.922 356.046,18.0666 356.587,18.2129 357.129,18.3609 357.671,18.5105 358.213,18.6617 \n",
       "  358.754,18.8146 359.296,18.9692 359.838,19.1254 360.379,19.2833 360.921,19.4428 361.463,19.604 362.005,19.7668 362.546,19.9312 363.088,20.0973 363.63,20.2651 \n",
       "  364.171,20.4345 364.713,20.6055 365.255,20.7781 365.797,20.9524 366.338,21.1283 366.88,21.3059 367.422,21.485 367.963,21.6658 368.505,21.8483 369.047,22.0323 \n",
       "  369.589,22.218 370.13,22.4053 370.672,22.5942 371.214,22.7847 371.755,22.9768 372.297,23.1706 372.839,23.3659 373.381,23.5629 373.922,23.7615 374.464,23.9617 \n",
       "  375.006,24.1634 375.547,24.3668 376.089,24.5718 376.631,24.7784 377.173,24.9866 377.714,25.1963 378.256,25.4077 378.798,25.6206 379.339,25.8351 379.881,26.0513 \n",
       "  380.423,26.2689 380.965,26.4882 381.506,26.7091 382.048,26.9315 382.59,27.1555 383.131,27.3811 383.673,27.6082 384.215,27.8369 384.757,28.0672 385.298,28.299 \n",
       "  385.84,28.5324 386.382,28.7673 386.923,29.0038 387.465,29.2419 388.007,29.4815 388.549,29.7226 389.09,29.9653 389.632,30.2095 390.174,30.4553 390.715,30.7026 \n",
       "  391.257,30.9515 391.799,31.2018 392.341,31.4537 392.882,31.7072 393.424,31.9621 393.966,32.2186 394.507,32.4766 395.049,32.7361 395.591,32.9972 396.133,33.2597 \n",
       "  396.674,33.5238 397.216,33.7893 397.758,34.0564 398.299,34.3249 398.841,34.595 399.383,34.8666 399.925,35.1396 400.466,35.4142 401.008,35.6902 401.55,35.9677 \n",
       "  402.091,36.2467 402.633,36.5272 403.175,36.8091 403.716,37.0925 404.258,37.3774 404.8,37.6638 405.342,37.9516 405.883,38.2409 406.425,38.5317 406.967,38.8239 \n",
       "  407.508,39.1176 408.05,39.4127 408.592,39.7093 409.134,40.0073 409.675,40.3067 410.217,40.6076 410.759,40.91 411.3,41.2137 411.842,41.5189 412.384,41.8256 \n",
       "  412.926,42.1336 413.467,42.4431 414.009,42.754 414.551,43.0663 415.092,43.38 415.634,43.6951 416.176,44.0117 416.718,44.3296 417.259,44.6489 417.801,44.9697 \n",
       "  418.343,45.2918 418.884,45.6153 419.426,45.9402 419.968,46.2665 420.51,46.5942 421.051,46.9232 421.593,47.2537 422.135,47.5854 422.676,47.9186 423.218,48.2531 \n",
       "  423.76,48.589 424.302,48.9263 424.843,49.2649 425.385,49.6048 425.927,49.9461 426.468,50.2887 427.01,50.6327 427.552,50.978 428.094,51.3247 428.635,51.6727 \n",
       "  429.177,52.022 429.719,52.3726 430.26,52.7246 430.802,53.0778 431.344,53.4324 431.886,53.7883 432.427,54.1455 432.969,54.504 433.511,54.8638 434.052,55.2249 \n",
       "  434.594,55.5873 435.136,55.951 435.678,56.316 436.219,56.6822 436.761,57.0498 437.303,57.4186 437.844,57.7887 438.386,58.16 438.928,58.5326 439.47,58.9065 \n",
       "  440.011,59.2816 440.553,59.658 441.095,60.0356 441.636,60.4145 442.178,60.7946 442.72,61.1759 443.262,61.5585 443.803,61.9423 444.345,62.3274 444.887,62.7136 \n",
       "  445.428,63.1011 445.97,63.4898 446.512,63.8797 447.054,64.2708 447.595,64.6632 448.137,65.0567 448.679,65.4514 449.22,65.8473 449.762,66.2444 450.304,66.6427 \n",
       "  450.846,67.0422 451.387,67.4428 451.929,67.8446 452.471,68.2476 453.012,68.6517 453.554,69.0571 454.096,69.4635 454.638,69.8711 455.179,70.2799 455.721,70.6898 \n",
       "  456.263,71.1009 456.804,71.5131 457.346,71.9264 457.888,72.3408 458.43,72.7564 458.971,73.1731 459.513,73.5909 460.055,74.0098 460.596,74.4299 461.138,74.851 \n",
       "  461.68,75.2732 462.222,75.6966 462.763,76.121 463.305,76.5465 463.847,76.9731 464.388,77.4008 464.93,77.8295 465.472,78.2593 466.013,78.6902 466.555,79.1221 \n",
       "  467.097,79.5551 467.639,79.9892 468.18,80.4243 468.722,80.8605 469.264,81.2976 469.805,81.7359 470.347,82.1751 470.889,82.6154 471.431,83.0567 471.972,83.499 \n",
       "  472.514,83.9424 473.056,84.3867 473.597,84.8321 474.139,85.2784 474.681,85.7258 475.223,86.1741 475.764,86.6234 476.306,87.0738 476.848,87.525 477.389,87.9773 \n",
       "  477.931,88.4305 478.473,88.8847 479.015,89.3399 479.556,89.796 480.098,90.2531 480.64,90.7111 481.181,91.17 481.723,91.6299 482.265,92.0907 482.807,92.5525 \n",
       "  483.348,93.0152 483.89,93.4788 484.432,93.9433 484.973,94.4087 485.515,94.875 486.057,95.3422 486.599,95.8103 487.14,96.2793 487.682,96.7492 488.224,97.22 \n",
       "  488.765,97.6916 489.307,98.1642 489.849,98.6376 490.391,99.1118 490.932,99.5869 491.474,100.063 492.016,100.54 492.557,101.017 493.099,101.496 493.641,101.975 \n",
       "  494.183,102.455 494.724,102.936 495.266,103.418 495.808,103.901 496.349,104.384 496.891,104.868 497.433,105.353 497.975,105.839 498.516,106.326 499.058,106.813 \n",
       "  499.6,107.301 500.141,107.79 500.683,108.28 501.225,108.77 501.767,109.262 502.308,109.754 502.85,110.246 503.392,110.74 503.933,111.234 504.475,111.729 \n",
       "  505.017,112.225 505.559,112.721 506.1,113.219 506.642,113.717 507.184,114.215 507.725,114.715 508.267,115.215 508.809,115.715 509.351,116.217 509.892,116.719 \n",
       "  510.434,117.222 510.976,117.725 511.517,118.229 512.059,118.734 512.601,119.24 513.143,119.746 513.684,120.253 514.226,120.76 514.768,121.268 515.309,121.777 \n",
       "  515.851,122.286 516.393,122.796 516.935,123.307 517.476,123.818 518.018,124.33 518.56,124.842 519.101,125.356 519.643,125.869 520.185,126.383 520.727,126.898 \n",
       "  521.268,127.414 521.81,127.93 522.352,128.446 522.893,128.963 523.435,129.481 523.977,129.999 524.519,130.518 525.06,131.038 525.602,131.558 526.144,132.078 \n",
       "  526.685,132.599 527.227,133.121 527.769,133.643 528.311,134.165 528.852,134.688 529.394,135.212 529.936,135.736 530.477,136.26 531.019,136.785 531.561,137.311 \n",
       "  532.102,137.837 532.644,138.363 533.186,138.89 533.728,139.418 534.269,139.946 534.811,140.474 535.353,141.003 535.894,141.532 536.436,142.062 536.978,142.592 \n",
       "  537.52,143.123 538.061,143.653 538.603,144.185 539.145,144.717 539.686,145.249 540.228,145.781 540.77,146.314 541.312,146.848 541.853,147.382 542.395,147.916 \n",
       "  542.937,148.45 543.478,148.985 544.02,149.521 544.562,150.056 545.104,150.592 545.645,151.129 546.187,151.665 546.729,152.202 547.27,152.74 547.812,153.277 \n",
       "  548.354,153.815 548.896,154.354 549.437,154.892 549.979,155.431 550.521,155.971 551.062,156.51 551.604,157.05 552.146,157.59 552.688,158.13 553.229,158.671 \n",
       "  553.771,159.212 554.313,159.753 554.854,160.295 555.396,160.837 555.938,161.379 556.48,161.921 557.021,162.463 557.563,163.006 558.105,163.549 558.646,164.092 \n",
       "  559.188,164.635 559.73,165.179 560.272,165.723 560.813,166.267 561.355,166.811 561.897,167.355 562.438,167.9 562.98,168.445 563.522,168.99 564.064,169.535 \n",
       "  564.605,170.08 565.147,170.625 565.689,171.171 566.23,171.717 566.772,172.262 567.314,172.808 567.856,173.354 568.397,173.901 568.939,174.447 569.481,174.993 \n",
       "  570.022,175.54 570.564,176.087 571.106,176.633 571.648,177.18 572.189,177.727 572.731,178.274 573.273,178.821 573.814,179.369 574.356,179.916 574.898,180.463 \n",
       "  575.44,181.011 575.981,181.558 576.523,182.105 577.065,182.653 577.606,183.2 578.148,183.748 578.69,184.295 579.232,184.843 579.773,185.391 580.315,185.937 \n",
       "  \n",
       "  \"/>\n",
       "<polygon clip-path=\"url(#clip8500)\" points=\"\n",
       "485.201,78.051 562.315,78.051 562.315,32.691 485.201,32.691 \n",
       "  \" fill=\"#ffffff\" fill-opacity=\"1\"/>\n",
       "<polyline clip-path=\"url(#clip8500)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  485.201,78.051 562.315,78.051 562.315,32.691 485.201,32.691 485.201,78.051 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8500)\" style=\"stroke:#009af9; stroke-width:3; stroke-opacity:1; fill:none\" points=\"\n",
       "  491.201,47.811 527.201,47.811 \n",
       "  \"/>\n",
       "<g clip-path=\"url(#clip8500)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:start;\" transform=\"rotate(0, 533.201, 52.311)\" x=\"533.201\" y=\"52.311\">v(t)</text>\n",
       "</g>\n",
       "<polyline clip-path=\"url(#clip8500)\" style=\"stroke:#e26f46; stroke-width:3; stroke-opacity:1; fill:none\" points=\"\n",
       "  491.201,62.931 527.201,62.931 \n",
       "  \"/>\n",
       "<g clip-path=\"url(#clip8500)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:start;\" transform=\"rotate(0, 533.201, 67.431)\" x=\"533.201\" y=\"67.431\">x(t)</text>\n",
       "</g>\n",
       "</svg>\n"
      ]
     },
     "execution_count": 111,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sol = solve(prob,callback=terminate_cb)\n",
    "plot(sol)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Notice that the harmonic oscilator's true solution here is `sin` and `cosine`, and thus we would expect this return to zero to happen at `t=π`:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 112,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "3.141590249830346"
      ]
     },
     "execution_count": 112,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sol.t[end]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "This is one way to approximate π! Lower tolerances and arbitrary precision numbers can make this more exact, but let's not look at that. Instead, what if we wanted to halt the integration after exactly one cycle? To do so we would need to ignore the first zero-crossing. Luckily in these types of scenarios there's usually a structure to the problem that can be exploited. Here, we only want to trigger the `affect!` when crossing from positive to negative, and not when crossing from negative to positive. In other words, we want our `affect!` to only occur on upcrossings.\n",
    "\n",
    "If the `ContinuousCallback` constructor is given a single `affect!`, it will occur on both upcrossings and downcrossings. If there are two `affect!`s given, then the first is for upcrossings and the second is for downcrossings. An `affect!` can be ignored by using `nothing`. Together, the \"upcrossing-only\" version of the effect means that the first `affect!` is what we defined above and the second is `nothing`. Therefore we want:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 116,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "DiffEqBase.ContinuousCallback{#terminate_condition,#terminate_affect!,Void,DiffEqBase.#INITIALIZE_DEFAULT,Float64,Int64,Void}(terminate_condition, terminate_affect!, nothing, DiffEqBase.INITIALIZE_DEFAULT, nothing, true, 10, (true, true), 1.0e-9, 0)"
      ]
     },
     "execution_count": 116,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "terminate_upcrossing_cb = ContinuousCallback(terminate_condition,terminate_affect!,nothing)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Which gives us:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 117,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n",
       "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"600\" height=\"400\" viewBox=\"0 0 600 400\">\n",
       "<defs>\n",
       "  <clipPath id=\"clip8900\">\n",
       "    <rect x=\"0\" y=\"0\" width=\"600\" height=\"400\"/>\n",
       "  </clipPath>\n",
       "</defs>\n",
       "<polygon clip-path=\"url(#clip8900)\" points=\"\n",
       "0,400 600,400 600,0 0,0 \n",
       "  \" fill=\"#ffffff\" fill-opacity=\"1\"/>\n",
       "<defs>\n",
       "  <clipPath id=\"clip8901\">\n",
       "    <rect x=\"120\" y=\"0\" width=\"421\" height=\"400\"/>\n",
       "  </clipPath>\n",
       "</defs>\n",
       "<polygon clip-path=\"url(#clip8900)\" points=\"\n",
       "39.1436,360.065 580.315,360.065 580.315,11.811 39.1436,11.811 \n",
       "  \" fill=\"#ffffff\" fill-opacity=\"1\"/>\n",
       "<defs>\n",
       "  <clipPath id=\"clip8902\">\n",
       "    <rect x=\"39\" y=\"11\" width=\"542\" height=\"349\"/>\n",
       "  </clipPath>\n",
       "</defs>\n",
       "<polyline clip-path=\"url(#clip8902)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  39.1436,360.065 39.1436,11.811 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8902)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  125.275,360.065 125.275,11.811 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8902)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  211.406,360.065 211.406,11.811 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8902)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  297.537,360.065 297.537,11.811 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8902)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  383.668,360.065 383.668,11.811 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8902)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  469.799,360.065 469.799,11.811 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8902)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  555.93,360.065 555.93,11.811 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8902)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  39.1436,360.061 580.315,360.061 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8902)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  39.1436,273.003 580.315,273.003 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8902)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  39.1436,185.945 580.315,185.945 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8902)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  39.1436,98.8866 580.315,98.8866 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8902)\" style=\"stroke:#000000; stroke-width:0.5; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  39.1436,11.8285 580.315,11.8285 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8900)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  39.1436,360.065 580.315,360.065 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8900)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  39.1436,360.065 39.1436,11.811 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8900)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  39.1436,360.065 39.1436,354.842 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8900)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  125.275,360.065 125.275,354.842 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8900)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  211.406,360.065 211.406,354.842 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8900)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  297.537,360.065 297.537,354.842 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8900)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  383.668,360.065 383.668,354.842 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8900)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  469.799,360.065 469.799,354.842 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8900)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  555.93,360.065 555.93,354.842 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8900)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  39.1436,360.061 47.2612,360.061 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8900)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  39.1436,273.003 47.2612,273.003 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8900)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  39.1436,185.945 47.2612,185.945 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8900)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  39.1436,98.8866 47.2612,98.8866 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8900)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  39.1436,11.8285 47.2612,11.8285 \n",
       "  \"/>\n",
       "<g clip-path=\"url(#clip8900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 39.1436, 373.865)\" x=\"39.1436\" y=\"373.865\">0</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip8900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 125.275, 373.865)\" x=\"125.275\" y=\"373.865\">1</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip8900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 211.406, 373.865)\" x=\"211.406\" y=\"373.865\">2</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip8900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 297.537, 373.865)\" x=\"297.537\" y=\"373.865\">3</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip8900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 383.668, 373.865)\" x=\"383.668\" y=\"373.865\">4</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip8900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 469.799, 373.865)\" x=\"469.799\" y=\"373.865\">5</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip8900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 555.93, 373.865)\" x=\"555.93\" y=\"373.865\">6</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip8900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:end;\" transform=\"rotate(0, 33.1436, 364.561)\" x=\"33.1436\" y=\"364.561\">-1.0</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip8900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:end;\" transform=\"rotate(0, 33.1436, 277.503)\" x=\"33.1436\" y=\"277.503\">-0.5</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip8900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:end;\" transform=\"rotate(0, 33.1436, 190.445)\" x=\"33.1436\" y=\"190.445\">0.0</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip8900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:end;\" transform=\"rotate(0, 33.1436, 103.387)\" x=\"33.1436\" y=\"103.387\">0.5</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip8900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:end;\" transform=\"rotate(0, 33.1436, 16.3285)\" x=\"33.1436\" y=\"16.3285\">1.0</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip8900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:16; text-anchor:middle;\" transform=\"rotate(0, 309.729, 397.6)\" x=\"309.729\" y=\"397.6\">t</text>\n",
       "</g>\n",
       "<polyline clip-path=\"url(#clip8902)\" style=\"stroke:#009af9; stroke-width:3; stroke-opacity:1; fill:none\" points=\"\n",
       "  39.1436,11.8285 39.6853,11.832 40.227,11.8423 40.7687,11.8595 41.3104,11.8836 41.8522,11.9146 42.3939,11.9525 42.9356,11.9973 43.4773,12.0489 44.019,12.1074 \n",
       "  44.5607,12.1728 45.1024,12.2451 45.6441,12.3242 46.1859,12.4102 46.7276,12.5031 47.2693,12.6028 47.811,12.7094 48.3527,12.8228 48.8944,12.9431 49.4361,13.0702 \n",
       "  49.9778,13.2042 50.5196,13.345 51.0613,13.4926 51.603,13.6471 52.1447,13.8084 52.6864,13.9764 53.2281,14.1513 53.7698,14.333 54.3116,14.5214 54.8533,14.7167 \n",
       "  55.395,14.9187 55.9367,15.1275 56.4784,15.343 57.0201,15.5653 57.5618,15.7943 58.1035,16.0301 58.6453,16.2726 59.187,16.5218 59.7287,16.7776 60.2704,17.0402 \n",
       "  60.8121,17.3095 61.3538,17.5854 61.8955,17.868 62.4372,18.1573 62.979,18.4531 63.5207,18.7556 64.0624,19.0648 64.6041,19.3805 65.1458,19.7028 65.6875,20.0317 \n",
       "  66.2292,20.3671 66.771,20.7091 67.3127,21.0576 67.8544,21.4127 68.3961,21.7743 68.9378,22.1423 69.4795,22.5168 70.0212,22.8978 70.5629,23.2853 71.1047,23.6792 \n",
       "  71.6464,24.0795 72.1881,24.4862 72.7298,24.8993 73.2715,25.3187 73.8132,25.7446 74.3549,26.1767 74.8967,26.6152 75.4384,27.06 75.9801,27.511 76.5218,27.9684 \n",
       "  77.0635,28.4319 77.6052,28.9018 78.1469,29.3778 78.6886,29.86 79.2304,30.3484 79.7721,30.8429 80.3138,31.3436 80.8555,31.8504 81.3972,32.3633 81.9389,32.8822 \n",
       "  82.4806,33.4073 83.0223,33.9383 83.5641,34.4754 84.1058,35.0184 84.6475,35.5675 85.1892,36.1224 85.7309,36.6833 86.2726,37.2501 86.8143,37.8228 87.3561,38.4014 \n",
       "  87.8978,38.9858 88.4395,39.5759 88.9812,40.1719 89.5229,40.7737 90.0646,41.3812 90.6063,41.9944 91.148,42.6133 91.6898,43.2379 92.2315,43.8681 92.7732,44.5039 \n",
       "  93.3149,45.1454 93.8566,45.7924 94.3983,46.4449 94.94,47.103 95.4817,47.7665 96.0235,48.4356 96.5652,49.11 97.1069,49.7899 97.6486,50.4752 98.1903,51.1658 \n",
       "  98.732,51.8617 99.2737,52.563 99.8155,53.2695 100.357,53.9813 100.899,54.6983 101.441,55.4205 101.982,56.1479 102.524,56.8804 103.066,57.618 103.607,58.3607 \n",
       "  104.149,59.1084 104.691,59.8611 105.233,60.6188 105.774,61.3815 106.316,62.1491 106.858,62.9216 107.399,63.699 107.941,64.4812 108.483,65.2682 109.025,66.06 \n",
       "  109.566,66.8566 110.108,67.6578 110.65,68.4637 111.191,69.2743 111.733,70.0895 112.275,70.9092 112.817,71.7336 113.358,72.5624 113.9,73.3957 114.442,74.2335 \n",
       "  114.983,75.0757 115.525,75.9222 116.067,76.7732 116.609,77.6284 117.15,78.4879 117.692,79.3517 118.234,80.2197 118.775,81.0918 119.317,81.9682 119.859,82.8486 \n",
       "  120.401,83.7331 120.942,84.6216 121.484,85.5142 122.026,86.4107 122.567,87.3112 123.109,88.2156 123.651,89.1238 124.193,90.0359 124.734,90.9517 125.276,91.8713 \n",
       "  125.818,92.7947 126.359,93.7217 126.901,94.6524 127.443,95.5867 127.985,96.5245 128.526,97.4659 129.068,98.4108 129.61,99.3592 130.151,100.311 130.693,101.266 \n",
       "  131.235,102.225 131.777,103.187 132.318,104.152 132.86,105.12 133.402,106.092 133.943,107.066 134.485,108.044 135.027,109.025 135.569,110.009 136.11,110.996 \n",
       "  136.652,111.986 137.194,112.979 137.735,113.974 138.277,114.973 138.819,115.974 139.361,116.979 139.902,117.985 140.444,118.995 140.986,120.007 141.527,121.022 \n",
       "  142.069,122.039 142.611,123.059 143.152,124.082 143.694,125.107 144.236,126.134 144.778,127.164 145.319,128.196 145.861,129.23 146.403,130.266 146.944,131.305 \n",
       "  147.486,132.346 148.028,133.389 148.57,134.434 149.111,135.481 149.653,136.53 150.195,137.581 150.736,138.634 151.278,139.689 151.82,140.746 152.362,141.804 \n",
       "  152.903,142.864 153.445,143.926 153.987,144.99 154.528,146.055 155.07,147.121 155.612,148.19 156.154,149.259 156.695,150.331 157.237,151.403 157.779,152.477 \n",
       "  158.32,153.553 158.862,154.629 159.404,155.707 159.946,156.786 160.487,157.866 161.029,158.947 161.571,160.03 162.112,161.113 162.654,162.197 163.196,163.283 \n",
       "  163.738,164.369 164.279,165.456 164.821,166.544 165.363,167.633 165.904,168.722 166.446,169.812 166.988,170.903 167.53,171.994 168.071,173.086 168.613,174.178 \n",
       "  169.155,175.271 169.696,176.364 170.238,177.458 170.78,178.552 171.322,179.646 171.863,180.74 172.405,181.835 172.947,182.93 173.488,184.025 174.03,185.12 \n",
       "  174.572,186.215 175.114,187.31 175.655,188.405 176.197,189.5 176.739,190.595 177.28,191.69 177.822,192.784 178.364,193.878 178.906,194.972 179.447,196.065 \n",
       "  179.989,197.158 180.531,198.251 181.072,199.343 181.614,200.435 182.156,201.526 182.698,202.616 183.239,203.706 183.781,204.795 184.323,205.883 184.864,206.971 \n",
       "  185.406,208.057 185.948,209.143 186.49,210.228 187.031,211.312 187.573,212.395 188.115,213.477 188.656,214.558 189.198,215.637 189.74,216.716 190.282,217.793 \n",
       "  190.823,218.869 191.365,219.944 191.907,221.017 192.448,222.089 192.99,223.159 193.532,224.228 194.074,225.296 194.615,226.362 195.157,227.426 195.699,228.489 \n",
       "  196.24,229.55 196.782,230.609 197.324,231.667 197.866,232.723 198.407,233.777 198.949,234.828 199.491,235.879 200.032,236.927 200.574,237.973 201.116,239.017 \n",
       "  201.658,240.059 202.199,241.098 202.741,242.136 203.283,243.171 203.824,244.204 204.366,245.235 204.908,246.264 205.45,247.29 205.991,248.313 206.533,249.334 \n",
       "  207.075,250.353 207.616,251.369 208.158,252.383 208.7,253.394 209.241,254.402 209.783,255.407 210.325,256.41 210.867,257.41 211.408,258.407 211.95,259.402 \n",
       "  212.492,260.393 213.033,261.381 213.575,262.367 214.117,263.349 214.659,264.329 215.2,265.305 215.742,266.278 216.284,267.248 216.825,268.215 217.367,269.179 \n",
       "  217.909,270.139 218.451,271.096 218.992,272.049 219.534,272.999 220.076,273.946 220.617,274.889 221.159,275.829 221.701,276.765 222.243,277.697 222.784,278.626 \n",
       "  223.326,279.552 223.868,280.473 224.409,281.391 224.951,282.305 225.493,283.215 226.035,284.122 226.576,285.024 227.118,285.923 227.66,286.817 228.201,287.708 \n",
       "  228.743,288.595 229.285,289.477 229.827,290.356 230.368,291.23 230.91,292.1 231.452,292.966 231.993,293.828 232.535,294.686 233.077,295.539 233.619,296.388 \n",
       "  234.16,297.232 234.702,298.072 235.244,298.908 235.785,299.739 236.327,300.565 236.869,301.387 237.411,302.205 237.952,303.018 238.494,303.826 239.036,304.63 \n",
       "  239.577,305.429 240.119,306.223 240.661,307.012 241.203,307.797 241.744,308.577 242.286,309.352 242.828,310.122 243.369,310.887 243.911,311.647 244.453,312.402 \n",
       "  244.995,313.153 245.536,313.898 246.078,314.638 246.62,315.373 247.161,316.103 247.703,316.828 248.245,317.547 248.787,318.262 249.328,318.971 249.87,319.675 \n",
       "  250.412,320.373 250.953,321.067 251.495,321.754 252.037,322.437 252.579,323.114 253.12,323.786 253.662,324.452 254.204,325.113 254.745,325.768 255.287,326.418 \n",
       "  255.829,327.062 256.371,327.701 256.912,328.334 257.454,328.961 257.996,329.583 258.537,330.199 259.079,330.81 259.621,331.414 260.163,332.013 260.704,332.606 \n",
       "  261.246,333.194 261.788,333.775 262.329,334.351 262.871,334.92 263.413,335.484 263.955,336.042 264.496,336.594 265.038,337.14 265.58,337.681 266.121,338.215 \n",
       "  266.663,338.743 267.205,339.265 267.747,339.781 268.288,340.291 268.83,340.794 269.372,341.292 269.913,341.784 270.455,342.269 270.997,342.748 271.539,343.221 \n",
       "  272.08,343.688 272.622,344.149 273.164,344.603 273.705,345.051 274.247,345.493 274.789,345.928 275.33,346.357 275.872,346.78 276.414,347.197 276.956,347.607 \n",
       "  277.497,348.01 278.039,348.408 278.581,348.798 279.122,349.183 279.664,349.561 280.206,349.932 280.748,350.297 281.289,350.656 281.831,351.008 282.373,351.353 \n",
       "  282.914,351.692 283.456,352.024 283.998,352.35 284.54,352.669 285.081,352.982 285.623,353.288 286.165,353.587 286.706,353.88 287.248,354.166 287.79,354.445 \n",
       "  288.332,354.718 288.873,354.984 289.415,355.243 289.957,355.496 290.498,355.741 291.04,355.981 291.582,356.213 292.124,356.439 292.665,356.658 293.207,356.87 \n",
       "  293.749,357.075 294.29,357.274 294.832,357.466 295.374,357.651 295.916,357.829 296.457,358.001 296.999,358.165 297.541,358.323 298.082,358.474 298.624,358.619 \n",
       "  299.166,358.756 299.708,358.886 300.249,359.01 300.791,359.127 301.333,359.237 301.874,359.34 302.416,359.436 302.958,359.526 303.5,359.608 304.041,359.684 \n",
       "  304.583,359.753 305.125,359.814 305.666,359.869 306.208,359.918 306.75,359.959 307.292,359.993 307.833,360.021 308.375,360.041 308.917,360.055 309.458,360.062 \n",
       "  310,360.062 310.542,360.055 311.084,360.041 311.625,360.02 312.167,359.992 312.709,359.958 313.25,359.917 313.792,359.868 314.334,359.813 314.876,359.751 \n",
       "  315.417,359.682 315.959,359.607 316.501,359.524 317.042,359.435 317.584,359.338 318.126,359.235 318.668,359.125 319.209,359.008 319.751,358.884 320.293,358.754 \n",
       "  320.834,358.616 321.376,358.472 321.918,358.321 322.46,358.163 323.001,357.999 323.543,357.827 324.085,357.649 324.626,357.464 325.168,357.272 325.71,357.074 \n",
       "  326.252,356.869 326.793,356.657 327.335,356.438 327.877,356.212 328.418,355.98 328.96,355.741 329.502,355.495 330.044,355.243 330.585,354.984 331.127,354.718 \n",
       "  331.669,354.445 332.21,354.166 332.752,353.88 333.294,353.588 333.836,353.289 334.377,352.983 334.919,352.671 335.461,352.352 336.002,352.027 336.544,351.694 \n",
       "  337.086,351.356 337.627,351.011 338.169,350.659 338.711,350.301 339.253,349.936 339.794,349.565 340.336,349.187 340.878,348.803 341.419,348.413 341.961,348.016 \n",
       "  342.503,347.612 343.045,347.203 343.586,346.786 344.128,346.364 344.67,345.935 345.211,345.5 345.753,345.058 346.295,344.61 346.837,344.156 347.378,343.696 \n",
       "  347.92,343.229 348.462,342.756 349.003,342.277 349.545,341.792 350.087,341.3 350.629,340.803 351.17,340.299 351.712,339.789 352.254,339.273 352.795,338.751 \n",
       "  353.337,338.223 353.879,337.689 354.421,337.149 354.962,336.603 355.504,336.051 356.046,335.493 356.587,334.929 357.129,334.359 357.671,333.783 358.213,333.202 \n",
       "  358.754,332.614 359.296,332.021 359.838,331.422 360.379,330.818 360.921,330.207 361.463,329.591 362.005,328.969 362.546,328.342 363.088,327.708 363.63,327.07 \n",
       "  364.171,326.425 364.713,325.775 365.255,325.12 365.797,324.459 366.338,323.793 366.88,323.121 367.422,322.443 367.963,321.761 368.505,321.073 369.047,320.379 \n",
       "  369.589,319.681 370.13,318.977 370.672,318.267 371.214,317.553 371.755,316.833 372.297,316.108 372.839,315.378 373.381,314.643 373.922,313.903 374.464,313.158 \n",
       "  375.006,312.408 375.547,311.653 376.089,310.892 376.631,310.127 377.173,309.357 377.714,308.582 378.256,307.803 378.798,307.018 379.339,306.229 379.881,305.434 \n",
       "  380.423,304.636 380.965,303.832 381.506,303.024 382.048,302.211 382.59,301.393 383.131,300.572 383.673,299.745 384.215,298.914 384.757,298.078 385.298,297.239 \n",
       "  385.84,296.394 386.382,295.546 386.923,294.693 387.465,293.835 388.007,292.974 388.549,292.108 389.09,291.238 389.632,290.364 390.174,289.486 390.715,288.603 \n",
       "  391.257,287.717 391.799,286.826 392.341,285.932 392.882,285.034 393.424,284.131 393.966,283.225 394.507,282.315 395.049,281.401 395.591,280.484 396.133,279.562 \n",
       "  396.674,278.637 397.216,277.708 397.758,276.776 398.299,275.84 398.841,274.901 399.383,273.958 399.925,273.011 400.466,272.061 401.008,271.108 401.55,270.151 \n",
       "  402.091,269.191 402.633,268.228 403.175,267.261 403.716,266.291 404.258,265.318 404.8,264.342 405.342,263.362 405.883,262.38 406.425,261.395 406.967,260.406 \n",
       "  407.508,259.415 408.05,258.421 408.592,257.424 409.134,256.424 409.675,255.421 410.217,254.415 410.759,253.407 411.3,252.396 411.842,251.382 412.384,250.366 \n",
       "  412.926,249.348 413.467,248.326 414.009,247.303 414.551,246.276 415.092,245.248 415.634,244.217 416.176,243.184 416.718,242.148 417.259,241.11 417.801,240.07 \n",
       "  418.343,239.028 418.884,237.984 419.426,236.938 419.968,235.89 420.51,234.839 421.051,233.787 421.593,232.733 422.135,231.677 422.676,230.619 423.218,229.56 \n",
       "  423.76,228.498 424.302,227.435 424.843,226.371 425.385,225.305 425.927,224.237 426.468,223.168 427.01,222.097 427.552,221.025 428.094,219.951 428.635,218.877 \n",
       "  429.177,217.8 429.719,216.723 430.26,215.644 430.802,214.565 431.344,213.484 431.886,212.402 432.427,211.319 432.969,210.235 433.511,209.15 434.052,208.064 \n",
       "  434.594,206.978 435.136,205.89 435.678,204.802 436.219,203.713 436.761,202.623 437.303,201.532 437.844,200.441 438.386,199.35 438.928,198.257 439.47,197.165 \n",
       "  440.011,196.072 440.553,194.978 441.095,193.884 441.636,192.79 442.178,191.695 442.72,190.601 443.262,189.506 443.803,188.411 444.345,187.316 444.887,186.221 \n",
       "  445.428,185.125 445.97,184.03 446.512,182.935 447.054,181.84 447.595,180.746 448.137,179.651 448.679,178.557 449.22,177.463 449.762,176.369 450.304,175.276 \n",
       "  450.846,174.183 451.387,173.091 451.929,171.999 452.471,170.908 453.012,169.817 453.554,168.727 454.096,167.638 454.638,166.549 455.179,165.461 455.721,164.374 \n",
       "  456.263,163.288 456.804,162.203 457.346,161.118 457.888,160.035 458.43,158.953 458.971,157.872 459.513,156.791 460.055,155.712 460.596,154.635 461.138,153.558 \n",
       "  461.68,152.483 462.222,151.409 462.763,150.336 463.305,149.265 463.847,148.196 464.388,147.127 464.93,146.061 465.472,144.996 466.013,143.932 466.555,142.87 \n",
       "  467.097,141.81 467.639,140.752 468.18,139.695 468.722,138.641 469.264,137.588 469.805,136.537 470.347,135.488 470.889,134.441 471.431,133.396 471.972,132.353 \n",
       "  472.514,131.312 473.056,130.273 473.597,129.237 474.139,128.202 474.681,127.17 475.223,126.141 475.764,125.113 476.306,124.088 476.848,123.066 477.389,122.046 \n",
       "  477.931,121.029 478.473,120.014 479.015,119.001 479.556,117.992 480.098,116.985 480.64,115.98 481.181,114.979 481.723,113.98 482.265,112.984 482.807,111.991 \n",
       "  483.348,111.001 483.89,110.014 484.432,109.03 484.973,108.049 485.515,107.071 486.057,106.096 486.599,105.124 487.14,104.156 487.682,103.19 488.224,102.228 \n",
       "  488.765,101.269 489.307,100.314 489.849,99.3622 490.391,98.4136 490.932,97.4686 491.474,96.527 492.016,95.589 492.557,94.6546 493.099,93.7238 493.641,92.7967 \n",
       "  494.183,91.8732 494.724,90.9535 495.266,90.0376 495.808,89.1255 496.349,88.2172 496.891,87.3127 497.433,86.4122 497.975,85.5155 498.516,84.6228 499.058,83.7341 \n",
       "  499.6,82.8494 500.141,81.9687 500.683,81.0922 501.225,80.2198 501.767,79.3516 502.308,78.4876 502.85,77.6279 503.392,76.7724 503.933,75.9213 504.475,75.0745 \n",
       "  505.017,74.232 505.559,73.394 506.1,72.5605 506.642,71.7314 507.184,70.9069 507.725,70.0869 508.267,69.2715 508.809,68.4607 509.351,67.6546 509.892,66.8532 \n",
       "  510.434,66.0564 510.976,65.2645 511.517,64.4773 512.059,63.6949 512.601,62.9173 513.143,62.1447 513.684,61.3769 514.226,60.6141 514.768,59.8562 515.309,59.1034 \n",
       "  515.851,58.3555 516.393,57.6127 516.935,56.875 517.476,56.1424 518.018,55.415 518.56,54.6927 519.101,53.9757 519.643,53.2638 520.185,52.5572 520.727,51.8559 \n",
       "  521.268,51.16 521.81,50.4693 522.352,49.784 522.893,49.1041 523.435,48.4297 523.977,47.7607 524.519,47.0971 525.06,46.4391 525.602,45.7865 526.144,45.1396 \n",
       "  526.685,44.4982 527.227,43.8624 527.769,43.2322 528.311,42.6077 528.852,41.9888 529.394,41.3756 529.936,40.7682 530.477,40.1665 531.019,39.5706 531.561,38.9805 \n",
       "  532.102,38.3962 532.644,37.8177 533.186,37.2451 533.728,36.6784 534.269,36.1176 534.811,35.5627 535.353,35.0137 535.894,34.4708 536.436,33.9338 536.978,33.4028 \n",
       "  537.52,32.8779 538.061,32.359 538.603,31.8462 539.145,31.3395 539.686,30.8389 540.228,30.3444 540.77,29.8561 541.312,29.3739 541.853,28.898 542.395,28.4282 \n",
       "  542.937,27.9647 543.478,27.5074 544.02,27.0564 544.562,26.6117 545.104,26.1733 545.645,25.7412 546.187,25.3154 546.729,24.8959 547.27,24.4829 547.812,24.0762 \n",
       "  548.354,23.6759 548.896,23.2821 549.437,22.8946 549.979,22.5136 550.521,22.1391 551.062,21.7711 551.604,21.4095 552.146,21.0544 552.688,20.7059 553.229,20.3639 \n",
       "  553.771,20.0284 554.313,19.6996 554.854,19.3772 555.396,19.0615 555.938,18.7524 556.48,18.4499 557.021,18.154 557.563,17.8647 558.105,17.5821 558.646,17.3062 \n",
       "  559.188,17.0369 559.73,16.7743 560.272,16.5184 560.813,16.2692 561.355,16.0267 561.897,15.7909 562.438,15.5619 562.98,15.3396 563.522,15.1241 564.064,14.9153 \n",
       "  564.605,14.7132 565.147,14.518 565.689,14.3295 566.23,14.1478 566.772,13.9729 567.314,13.8049 567.856,13.6436 568.397,13.4891 568.939,13.3415 569.481,13.2007 \n",
       "  570.022,13.0667 570.564,12.9396 571.106,12.8193 571.648,12.7058 572.189,12.5992 572.731,12.4995 573.273,12.4066 573.814,12.3206 574.356,12.2415 574.898,12.1692 \n",
       "  575.44,12.1038 575.981,12.0453 576.523,11.9936 577.065,11.9489 577.606,11.911 578.148,11.88 578.69,11.8559 579.232,11.8387 579.773,11.8284 580.315,11.811 \n",
       "  \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8902)\" style=\"stroke:#e26f46; stroke-width:3; stroke-opacity:1; fill:none\" points=\"\n",
       "  39.1436,185.945 39.6853,184.85 40.227,183.755 40.7687,182.66 41.3104,181.565 41.8522,180.47 42.3939,179.376 42.9356,178.282 43.4773,177.188 44.019,176.094 \n",
       "  44.5607,175.001 45.1024,173.908 45.6441,172.816 46.1859,171.724 46.7276,170.633 47.2693,169.543 47.811,168.453 48.3527,167.364 48.8944,166.275 49.4361,165.188 \n",
       "  49.9778,164.101 50.5196,163.015 51.0613,161.93 51.603,160.845 52.1447,159.762 52.6864,158.68 53.2281,157.599 53.7698,156.519 54.3116,155.441 54.8533,154.363 \n",
       "  55.395,153.287 55.9367,152.212 56.4784,151.138 57.0201,150.066 57.5618,148.995 58.1035,147.925 58.6453,146.858 59.187,145.791 59.7287,144.726 60.2704,143.663 \n",
       "  60.8121,142.602 61.3538,141.542 61.8955,140.484 62.4372,139.428 62.979,138.374 63.5207,137.321 64.0624,136.271 64.6041,135.222 65.1458,134.175 65.6875,133.131 \n",
       "  66.2292,132.088 66.771,131.048 67.3127,130.01 67.8544,128.974 68.3961,127.94 68.9378,126.909 69.4795,125.88 70.0212,124.853 70.5629,123.829 71.1047,122.807 \n",
       "  71.6464,121.788 72.1881,120.771 72.7298,119.757 73.2715,118.745 73.8132,117.737 74.3549,116.73 74.8967,115.727 75.4384,114.726 75.9801,113.728 76.5218,112.733 \n",
       "  77.0635,111.741 77.6052,110.752 78.1469,109.766 78.6886,108.783 79.2304,107.802 79.7721,106.825 80.3138,105.851 80.8555,104.881 81.3972,103.913 81.9389,102.949 \n",
       "  82.4806,101.988 83.0223,101.03 83.5641,100.076 84.1058,99.1248 84.6475,98.1772 85.1892,97.2332 85.7309,96.2927 86.2726,95.3557 86.8143,94.4223 87.3561,93.4925 \n",
       "  87.8978,92.5663 88.4395,91.6439 88.9812,90.7252 89.5229,89.8103 90.0646,88.8991 90.6063,87.9918 91.148,87.0884 91.6898,86.1889 92.2315,85.2934 92.7732,84.4018 \n",
       "  93.3149,83.5142 93.8566,82.6307 94.3983,81.7513 94.94,80.876 95.4817,80.0049 96.0235,79.1379 96.5652,78.2752 97.1069,77.4167 97.6486,76.5625 98.1903,75.7127 \n",
       "  98.732,74.8672 99.2737,74.0261 99.8155,73.1894 100.357,72.3572 100.899,71.5295 101.441,70.7063 101.982,69.8877 102.524,69.0737 103.066,68.2642 103.607,67.4595 \n",
       "  104.149,66.6594 104.691,65.864 105.233,65.0734 105.774,64.2876 106.316,63.5066 106.858,62.7304 107.399,61.9591 107.941,61.1927 108.483,60.4312 109.025,59.6747 \n",
       "  109.566,58.9232 110.108,58.1767 110.65,57.4353 111.191,56.6989 111.733,55.9677 112.275,55.2416 112.817,54.5207 113.358,53.8049 113.9,53.0944 114.442,52.3892 \n",
       "  114.983,51.6892 115.525,50.9946 116.067,50.3052 116.609,49.6213 117.15,48.9427 117.692,48.2696 118.234,47.6019 118.775,46.9397 119.317,46.283 119.859,45.6318 \n",
       "  120.401,44.9862 120.942,44.3461 121.484,43.7117 122.026,43.0828 122.567,42.4597 123.109,41.8422 123.651,41.2304 124.193,40.6243 124.734,40.024 125.276,39.4294 \n",
       "  125.818,38.8407 126.359,38.2577 126.901,37.6807 127.443,37.1094 127.985,36.5441 128.526,35.9847 129.068,35.4312 129.61,34.8836 130.151,34.3421 130.693,33.8065 \n",
       "  131.235,33.2769 131.777,32.7534 132.318,32.236 132.86,31.7246 133.402,31.2193 133.943,30.7202 134.485,30.2271 135.027,29.7403 135.569,29.2596 136.11,28.7851 \n",
       "  136.652,28.3169 137.194,27.8548 137.735,27.399 138.277,26.9495 138.819,26.5063 139.361,26.0694 139.902,25.6388 140.444,25.2146 140.986,24.7967 141.527,24.3851 \n",
       "  142.069,23.98 142.611,23.5813 143.152,23.189 143.694,22.8031 144.236,22.4237 144.778,22.0507 145.319,21.6842 145.861,21.3242 146.403,20.9708 146.944,20.6238 \n",
       "  147.486,20.2834 148.028,19.9496 148.57,19.6223 149.111,19.3016 149.653,18.9874 150.195,18.6799 150.736,18.379 151.278,18.0848 151.82,17.7971 152.362,17.5162 \n",
       "  152.903,17.2419 153.445,16.9742 153.987,16.7133 154.528,16.459 155.07,16.2115 155.612,15.9706 156.154,15.7365 156.695,15.5092 157.237,15.2885 157.779,15.0747 \n",
       "  158.32,14.8676 158.862,14.6672 159.404,14.4736 159.946,14.2869 160.487,14.1069 161.029,13.9337 161.571,13.7673 162.112,13.6077 162.654,13.455 163.196,13.309 \n",
       "  163.738,13.1699 164.279,13.0377 164.821,12.9123 165.363,12.7937 165.904,12.682 166.446,12.5771 166.988,12.4791 167.53,12.3879 168.071,12.3036 168.613,12.2262 \n",
       "  169.155,12.1557 169.696,12.092 170.238,12.0352 170.78,11.9853 171.322,11.9423 171.863,11.9061 172.405,11.8769 172.947,11.8545 173.488,11.839 174.03,11.8304 \n",
       "  174.572,11.8287 175.114,11.8338 175.655,11.8459 176.197,11.8648 176.739,11.8906 177.28,11.9233 177.822,11.9629 178.364,12.0094 178.906,12.0627 179.447,12.123 \n",
       "  179.989,12.19 180.531,12.264 181.072,12.3448 181.614,12.4325 182.156,12.5271 182.698,12.6285 183.239,12.7368 183.781,12.8519 184.323,12.9738 184.864,13.1026 \n",
       "  185.406,13.2383 185.948,13.3807 186.49,13.53 187.031,13.6861 187.573,13.8491 188.115,14.0188 188.656,14.1953 189.198,14.3786 189.74,14.5687 190.282,14.7656 \n",
       "  190.823,14.9693 191.365,15.1797 191.907,15.3969 192.448,15.6208 192.99,15.8515 193.532,16.0889 194.074,16.333 194.615,16.5838 195.157,16.8413 195.699,17.1055 \n",
       "  196.24,17.3764 196.782,17.654 197.324,17.9382 197.866,18.2291 198.407,18.5266 198.949,18.8307 199.491,19.1415 200.032,19.4588 200.574,19.7827 201.116,20.1132 \n",
       "  201.658,20.4503 202.199,20.7939 202.741,21.1441 203.283,21.5007 203.824,21.8639 204.366,22.2336 204.908,22.6097 205.45,22.9923 205.991,23.3814 206.533,23.7769 \n",
       "  207.075,24.1788 207.616,24.5871 208.158,25.0018 208.7,25.4229 209.241,25.8503 209.783,26.284 210.325,26.7241 210.867,27.1705 211.408,27.6231 211.95,28.082 \n",
       "  212.492,28.5472 213.033,29.0186 213.575,29.4962 214.117,29.98 214.659,30.4699 215.2,30.966 215.742,31.4682 216.284,31.9766 216.825,32.491 217.367,33.0115 \n",
       "  217.909,33.538 218.451,34.0706 218.992,34.6091 219.534,35.1537 220.076,35.7042 220.617,36.2606 221.159,36.823 221.701,37.3913 222.243,37.9654 222.784,38.5454 \n",
       "  223.326,39.1312 223.868,39.7228 224.409,40.3202 224.951,40.9234 225.493,41.5323 226.035,42.1469 226.576,42.7672 227.118,43.3932 227.66,44.0248 228.201,44.662 \n",
       "  228.743,45.3048 229.285,45.9531 229.827,46.607 230.368,47.2664 230.91,47.9313 231.452,48.6016 231.993,49.2774 232.535,49.9586 233.077,50.6451 233.619,51.337 \n",
       "  234.16,52.0343 234.702,52.7368 235.244,53.4446 235.785,54.1576 236.327,54.8758 236.869,55.5993 237.411,56.3279 237.952,57.0616 238.494,57.8004 239.036,58.5442 \n",
       "  239.577,59.2932 240.119,60.0471 240.661,60.806 241.203,61.5699 241.744,62.3386 242.286,63.1123 242.828,63.8908 243.369,64.6742 243.911,65.4624 244.453,66.2553 \n",
       "  244.995,67.053 245.536,67.8554 246.078,68.6624 246.62,69.4741 247.161,70.2904 247.703,71.1113 248.245,71.9367 248.787,72.7667 249.328,73.6011 249.87,74.44 \n",
       "  250.412,75.2833 250.953,76.1309 251.495,76.983 252.037,77.8393 252.579,78.6999 253.12,79.5648 253.662,80.4339 254.204,81.3071 254.745,82.1845 255.287,83.066 \n",
       "  255.829,83.9516 256.371,84.8412 256.912,85.7349 257.454,86.6324 257.996,87.534 258.537,88.4394 259.079,89.3486 259.621,90.2617 260.163,91.1786 260.704,92.0993 \n",
       "  261.246,93.0236 261.788,93.9516 262.329,94.8833 262.871,95.8185 263.413,96.7573 263.955,97.6997 264.496,98.6455 265.038,99.5947 265.58,100.547 266.121,101.503 \n",
       "  266.663,102.463 267.205,103.426 267.747,104.391 268.288,105.361 268.83,106.333 269.372,107.308 269.913,108.287 270.455,109.269 270.997,110.253 271.539,111.241 \n",
       "  272.08,112.232 272.622,113.225 273.164,114.222 273.705,115.221 274.247,116.223 274.789,117.228 275.33,118.236 275.872,119.246 276.414,120.259 276.956,121.274 \n",
       "  277.497,122.292 278.039,123.313 278.581,124.336 279.122,125.361 279.664,126.389 280.206,127.419 280.748,128.452 281.289,129.487 281.831,130.524 282.373,131.563 \n",
       "  282.914,132.604 283.456,133.648 283.998,134.693 284.54,135.741 285.081,136.79 285.623,137.842 286.165,138.895 286.706,139.95 287.248,141.007 287.79,142.066 \n",
       "  288.332,143.127 288.873,144.189 289.415,145.253 289.957,146.318 290.498,147.385 291.04,148.454 291.582,149.524 292.124,150.596 292.665,151.668 293.207,152.743 \n",
       "  293.749,153.818 294.29,154.895 294.832,155.973 295.374,157.052 295.916,158.133 296.457,159.214 296.999,160.297 297.541,161.381 298.082,162.465 298.624,163.551 \n",
       "  299.166,164.637 299.708,165.724 300.249,166.812 300.791,167.901 301.333,168.991 301.874,170.081 302.416,171.172 302.958,172.263 303.5,173.355 304.041,174.448 \n",
       "  304.583,175.541 305.125,176.634 305.666,177.728 306.208,178.822 306.75,179.916 307.292,181.011 307.833,182.106 308.375,183.201 308.917,184.296 309.458,185.391 \n",
       "  310,186.486 310.542,187.581 311.084,188.676 311.625,189.771 312.167,190.866 312.709,191.961 313.25,193.055 313.792,194.149 314.334,195.243 314.876,196.337 \n",
       "  315.417,197.43 315.959,198.522 316.501,199.614 317.042,200.706 317.584,201.797 318.126,202.887 318.668,203.977 319.209,205.066 319.751,206.154 320.293,207.241 \n",
       "  320.834,208.327 321.376,209.413 321.918,210.498 322.46,211.581 323.001,212.664 323.543,213.746 324.085,214.826 324.626,215.906 325.168,216.984 325.71,218.061 \n",
       "  326.252,219.137 326.793,220.211 327.335,221.284 327.877,222.356 328.418,223.426 328.96,224.495 329.502,225.562 330.044,226.628 330.585,227.692 331.127,228.754 \n",
       "  331.669,229.815 332.21,230.874 332.752,231.931 333.294,232.986 333.836,234.04 334.377,235.091 334.919,236.141 335.461,237.189 336.002,238.234 336.544,239.278 \n",
       "  337.086,240.319 337.627,241.359 338.169,242.396 338.711,243.43 339.253,244.463 339.794,245.493 340.336,246.521 340.878,247.546 341.419,248.57 341.961,249.59 \n",
       "  342.503,250.608 343.045,251.624 343.586,252.636 344.128,253.647 344.67,254.654 345.211,255.659 345.753,256.661 346.295,257.66 346.837,258.657 347.378,259.65 \n",
       "  347.92,260.641 348.462,261.628 349.003,262.613 349.545,263.595 350.087,264.573 350.629,265.549 351.17,266.521 351.712,267.49 352.254,268.456 352.795,269.419 \n",
       "  353.337,270.378 353.879,271.334 354.421,272.287 354.962,273.236 355.504,274.182 356.046,275.124 356.587,276.063 357.129,276.998 357.671,277.929 358.213,278.857 \n",
       "  358.754,279.782 359.296,280.702 359.838,281.619 360.379,282.532 360.921,283.441 361.463,284.347 362.005,285.248 362.546,286.146 363.088,287.039 363.63,287.929 \n",
       "  364.171,288.815 364.713,289.696 365.255,290.573 365.797,291.447 366.338,292.316 366.88,293.181 367.422,294.041 367.963,294.898 368.505,295.75 369.047,296.598 \n",
       "  369.589,297.441 370.13,298.28 370.672,299.114 371.214,299.944 371.755,300.77 372.297,301.591 372.839,302.407 373.381,303.219 373.922,304.026 374.464,304.829 \n",
       "  375.006,305.626 375.547,306.419 376.089,307.208 376.631,307.991 377.173,308.77 377.714,309.544 378.256,310.313 378.798,311.077 379.339,311.836 379.881,312.59 \n",
       "  380.423,313.339 380.965,314.084 381.506,314.823 382.048,315.557 382.59,316.286 383.131,317.009 383.673,317.728 384.215,318.441 384.757,319.149 385.298,319.852 \n",
       "  385.84,320.549 386.382,321.242 386.923,321.928 387.465,322.61 388.007,323.286 388.549,323.957 389.09,324.622 389.632,325.281 390.174,325.935 390.715,326.584 \n",
       "  391.257,327.227 391.799,327.864 392.341,328.496 392.882,329.122 393.424,329.743 393.966,330.358 394.507,330.967 395.049,331.57 395.591,332.168 396.133,332.759 \n",
       "  396.674,333.345 397.216,333.925 397.758,334.5 398.299,335.068 398.841,335.63 399.383,336.187 399.925,336.737 400.466,337.282 401.008,337.821 401.55,338.353 \n",
       "  402.091,338.88 402.633,339.4 403.175,339.915 403.716,340.423 404.258,340.925 404.8,341.421 405.342,341.911 405.883,342.395 406.425,342.872 406.967,343.344 \n",
       "  407.508,343.809 408.05,344.268 408.592,344.72 409.134,345.167 409.675,345.607 410.217,346.04 410.759,346.468 411.3,346.889 411.842,347.303 412.384,347.711 \n",
       "  412.926,348.113 413.467,348.509 414.009,348.898 414.551,349.28 415.092,349.656 415.634,350.026 416.176,350.389 416.718,350.746 417.259,351.096 417.801,351.439 \n",
       "  418.343,351.776 418.884,352.107 419.426,352.43 419.968,352.748 420.51,353.058 421.051,353.363 421.593,353.66 422.135,353.951 422.676,354.235 423.218,354.513 \n",
       "  423.76,354.783 424.302,355.048 424.843,355.305 425.385,355.556 425.927,355.8 426.468,356.038 427.01,356.268 427.552,356.492 428.094,356.709 428.635,356.92 \n",
       "  429.177,357.124 429.719,357.32 430.26,357.511 430.802,357.694 431.344,357.871 431.886,358.04 432.427,358.203 432.969,358.36 433.511,358.509 434.052,358.651 \n",
       "  434.594,358.787 435.136,358.916 435.678,359.038 436.219,359.154 436.761,359.262 437.303,359.364 437.844,359.458 438.386,359.546 438.928,359.627 439.47,359.701 \n",
       "  440.011,359.769 440.553,359.829 441.095,359.883 441.636,359.93 442.178,359.969 442.72,360.002 443.262,360.028 443.803,360.048 444.345,360.06 444.887,360.065 \n",
       "  445.428,360.064 445.97,360.056 446.512,360.04 447.054,360.018 447.595,359.989 448.137,359.953 448.679,359.911 449.22,359.861 449.762,359.805 450.304,359.741 \n",
       "  450.846,359.671 451.387,359.594 451.929,359.51 452.471,359.419 453.012,359.321 453.554,359.216 454.096,359.105 454.638,358.986 455.179,358.861 455.721,358.729 \n",
       "  456.263,358.59 456.804,358.445 457.346,358.292 457.888,358.133 458.43,357.966 458.971,357.793 459.513,357.614 460.055,357.427 460.596,357.234 461.138,357.033 \n",
       "  461.68,356.826 462.222,356.613 462.763,356.392 463.305,356.165 463.847,355.931 464.388,355.69 464.93,355.443 465.472,355.188 466.013,354.928 466.555,354.66 \n",
       "  467.097,354.386 467.639,354.105 468.18,353.817 468.722,353.523 469.264,353.222 469.805,352.914 470.347,352.6 470.889,352.279 471.431,351.952 471.972,351.618 \n",
       "  472.514,351.278 473.056,350.931 473.597,350.577 474.139,350.217 474.681,349.85 475.223,349.477 475.764,349.098 476.306,348.712 476.848,348.319 477.389,347.92 \n",
       "  477.931,347.515 478.473,347.103 479.015,346.685 479.556,346.26 480.098,345.83 480.64,345.393 481.181,344.949 481.723,344.499 482.265,344.043 482.807,343.581 \n",
       "  483.348,343.112 483.89,342.638 484.432,342.157 484.973,341.67 485.515,341.176 486.057,340.677 486.599,340.171 487.14,339.66 487.682,339.142 488.224,338.618 \n",
       "  488.765,338.088 489.307,337.553 489.849,337.011 490.391,336.463 490.932,335.909 491.474,335.35 492.016,334.784 492.557,334.213 493.099,333.636 493.641,333.053 \n",
       "  494.183,332.464 494.724,331.869 495.266,331.269 495.808,330.663 496.349,330.051 496.891,329.434 497.433,328.811 497.975,328.182 498.516,327.547 499.058,326.907 \n",
       "  499.6,326.262 500.141,325.611 500.683,324.954 501.225,324.292 501.767,323.624 502.308,322.951 502.85,322.273 503.392,321.589 503.933,320.9 504.475,320.205 \n",
       "  505.017,319.505 505.559,318.8 506.1,318.09 506.642,317.374 507.184,316.653 507.725,315.927 508.267,315.196 508.809,314.46 509.351,313.719 509.892,312.972 \n",
       "  510.434,312.221 510.976,311.465 511.517,310.703 512.059,309.937 512.601,309.166 513.143,308.39 513.684,307.609 514.226,306.824 514.768,306.033 515.309,305.238 \n",
       "  515.851,304.438 516.393,303.633 516.935,302.824 517.476,302.01 518.018,301.192 518.56,300.369 519.101,299.541 519.643,298.709 520.185,297.873 520.727,297.032 \n",
       "  521.268,296.186 521.81,295.337 522.352,294.483 522.893,293.624 523.435,292.762 523.977,291.895 524.519,291.024 525.06,290.148 525.602,289.269 526.144,288.386 \n",
       "  526.685,287.498 527.227,286.607 527.769,285.711 528.311,284.812 528.852,283.908 529.394,283.001 529.936,282.09 530.477,281.175 531.019,280.256 531.561,279.334 \n",
       "  532.102,278.408 532.644,277.478 533.186,276.544 533.728,275.607 534.269,274.666 534.811,273.722 535.353,272.775 535.894,271.824 536.436,270.869 536.978,269.911 \n",
       "  537.52,268.95 538.061,267.986 538.603,267.018 539.145,266.047 539.686,265.073 540.228,264.095 540.77,263.115 541.312,262.132 541.853,261.145 542.395,260.156 \n",
       "  542.937,259.163 543.478,258.168 544.02,257.17 544.562,256.169 545.104,255.165 545.645,254.159 546.187,253.149 546.729,252.138 547.27,251.123 547.812,250.106 \n",
       "  548.354,249.086 548.896,248.064 549.437,247.04 549.979,246.013 550.521,244.984 551.062,243.952 551.604,242.918 552.146,241.882 552.688,240.844 553.229,239.803 \n",
       "  553.771,238.761 554.313,237.716 554.854,236.669 555.396,235.621 555.938,234.57 556.48,233.518 557.021,232.463 557.563,231.407 558.105,230.349 558.646,229.289 \n",
       "  559.188,228.228 559.73,227.164 560.272,226.1 560.813,225.033 561.355,223.965 561.897,222.896 562.438,221.825 562.98,220.753 563.522,219.679 564.064,218.604 \n",
       "  564.605,217.528 565.147,216.45 565.689,215.371 566.23,214.291 566.772,213.21 567.314,212.128 567.856,211.045 568.397,209.961 568.939,208.876 569.481,207.79 \n",
       "  570.022,206.703 570.564,205.615 571.106,204.527 571.648,203.438 572.189,202.348 572.731,201.257 573.273,200.166 573.814,199.075 574.356,197.982 574.898,196.89 \n",
       "  575.44,195.796 575.981,194.703 576.523,193.609 577.065,192.515 577.606,191.42 578.148,190.326 578.69,189.231 579.232,188.136 579.773,187.041 580.315,185.945 \n",
       "  \n",
       "  \"/>\n",
       "<polygon clip-path=\"url(#clip8900)\" points=\"\n",
       "485.201,78.051 562.315,78.051 562.315,32.691 485.201,32.691 \n",
       "  \" fill=\"#ffffff\" fill-opacity=\"1\"/>\n",
       "<polyline clip-path=\"url(#clip8900)\" style=\"stroke:#000000; stroke-width:1; stroke-opacity:1; fill:none\" points=\"\n",
       "  485.201,78.051 562.315,78.051 562.315,32.691 485.201,32.691 485.201,78.051 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip8900)\" style=\"stroke:#009af9; stroke-width:3; stroke-opacity:1; fill:none\" points=\"\n",
       "  491.201,47.811 527.201,47.811 \n",
       "  \"/>\n",
       "<g clip-path=\"url(#clip8900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:start;\" transform=\"rotate(0, 533.201, 52.311)\" x=\"533.201\" y=\"52.311\">v(t)</text>\n",
       "</g>\n",
       "<polyline clip-path=\"url(#clip8900)\" style=\"stroke:#e26f46; stroke-width:3; stroke-opacity:1; fill:none\" points=\"\n",
       "  491.201,62.931 527.201,62.931 \n",
       "  \"/>\n",
       "<g clip-path=\"url(#clip8900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:start;\" transform=\"rotate(0, 533.201, 67.431)\" x=\"533.201\" y=\"67.431\">x(t)</text>\n",
       "</g>\n",
       "</svg>\n"
      ]
     },
     "execution_count": 117,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sol = solve(prob,callback=terminate_upcrossing_cb)\n",
    "plot(sol)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Callback Library\n",
    "\n",
    "As you can see, callbacks can be very useful and through `CallbackSets` we can merge together various behaviors. Because of this utility, there is a library of pre-built callbacks known as the [Callback Library](http://docs.juliadiffeq.org/latest/features/callback_library.html). We will walk through a few examples where these callbacks can come in handy."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Manifold Projection\n",
    "\n",
    "One callback is the manifold projection callback. Essentially, you can define any manifold `g(sol)=0` which the solution must live on, and cause the integration to project to that manifold after every step. As an example, let's see what happens if we naively run the harmonic oscillator for a long time:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 141,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<img src=\"\" />"
      ]
     },
     "execution_count": 141,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "tspan = (0.0,10000.0)\n",
    "prob = ODEProblem(harmonic!,u0,tspan)\n",
    "sol = solve(prob)\n",
    "gr(fmt=:png) # Make it a PNG instead of an SVG since there's a lot of points!\n",
    "plot(sol,vars=(1,2))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 132,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<img src=\"\" />"
      ]
     },
     "execution_count": 132,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "plot(sol,vars=(0,1),denseplot=false)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Notice that what's going on is that the numerical solution is drifting from the true solution over this long time scale. This is because the integrator is not conserving energy."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 143,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<img src=\"\" />"
      ]
     },
     "execution_count": 143,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "plot(sol.t,[u[2]^2 + u[1]^2 for u in sol.u]) # Energy ~ x^2 + v^2"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Some integration techniques like [symplectic integrators](http://docs.juliadiffeq.org/latest/solvers/dynamical_solve.html#Symplectic-Integrators-1) are designed to mitigate this issue, but instead let's tackle the problem by enforcing conservation of energy. To do so, we define our manifold as the one where energy equals 1 (since that holds in the initial condition), that is:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 134,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "g (generic function with 1 method)"
      ]
     },
     "execution_count": 134,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "function g(resid,u,p,t)\n",
    "  resid[1] = u[2]^2 + u[1]^2 - 1\n",
    "  resid[2] = 0\n",
    "end"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Here the residual measures how far from our desired energy we are, and the number of conditions matches the size of our system (we ignored the second one by making the residual 0). Thus we define a `ManifoldProjection` callback and add that to the solver:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 137,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<img src=\"\" />"
      ]
     },
     "execution_count": 137,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cb = ManifoldProjection(g)\n",
    "sol = solve(prob,callback=cb)\n",
    "plot(sol,vars=(1,2))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 138,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<img src=\"\" />"
      ]
     },
     "execution_count": 138,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "plot(sol,vars=(0,1),denseplot=false)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Now we have \"perfect\" energy conservation, where if it's ever violated too much the solution will get projected back to `energy=1`."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 140,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1.000000000579175"
      ]
     },
     "execution_count": 140,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "u1,u2 = sol[500]\n",
    "u2^2 + u1^2"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "While choosing different integration schemes and using lower tolerances can achieve this effect as well, this can be a nice way to enforce physical constraints and is thus used in many disciplines like molecular dynamics. Another such domain constraining callback is the [`PositiveCallback()`](http://docs.juliadiffeq.org/latest/features/callback_library.html#PositiveDomain-1) which can be used to enforce positivity of the variables."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### SavingCallback\n",
    "\n",
    "The `SavingCallback` can be used to allow for special saving behavior. Let's take a linear ODE define on a system of 1000x1000 matrices:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 144,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "DiffEqBase.ODEProblem with uType Array{Float64,2} and tType Float64. In-place: true\n",
       "timespan: (0.0, 1.0)\n",
       "u0: [0.274156 0.19674 … 0.283458 0.887401; 0.171726 0.327123 … 0.080116 0.894558; … ; 0.145367 0.8893 … 0.0706464 0.931397; 0.0435507 0.668118 … 0.851025 0.421555]"
      ]
     },
     "execution_count": 144,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "prob = ODEProblem((du,u,p,t)->du.=u,rand(1000,1000),(0.0,1.0))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "In fields like quantum mechanics you may only want to know specific properties of the solution such as the trace or the norm of the matrix. Saving all of the 1000x1000 matrices can be a costly way to get this information! Instead, we can use the `SavingCallback` to save the `trace` and `norm` at specified times. To do so, we first define our `SavedValues` cache. Our time is in terms of `Float64`, and we want to save tuples of `Float64`s (one for the `trace` and one for the `norm`), and thus we generate the cache as:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 145,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "SavedValues{tType=Float64, savevalType=Tuple{Float64,Float64}}\n",
       "t:\n",
       "Float64[]\n",
       "saveval:\n",
       "Tuple{Float64,Float64}[]"
      ]
     },
     "execution_count": 145,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "saved_values = SavedValues(Float64, Tuple{Float64,Float64})"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Now we define the `SavingCallback` by giving it a function of `(u,p,t,integrator)` that returns the values to save, and the cache:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 149,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "DiffEqBase.DiscreteCallback{DiffEqCallbacks.##30#31,DiffEqCallbacks.SavingAffect{##12#13,Float64,Tuple{Float64,Float64},DataStructures.BinaryHeap{Float64,DataStructures.LessThan},Array{Float64,1}},DiffEqCallbacks.#saving_initialize}(DiffEqCallbacks.#30, DiffEqCallbacks.SavingAffect{##12#13,Float64,Tuple{Float64,Float64},DataStructures.BinaryHeap{Float64,DataStructures.LessThan},Array{Float64,1}}(#12, SavedValues{tType=Float64, savevalType=Tuple{Float64,Float64}}\n",
       "t:\n",
       "[0.0]\n",
       "saveval:\n",
       "Tuple{Float64,Float64}[], DataStructures.BinaryHeap{Float64,DataStructures.LessThan}(DataStructures.LessThan(), Float64[]), Float64[], true, true, 0), DiffEqCallbacks.saving_initialize, (false, false))"
      ]
     },
     "execution_count": 149,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cb = SavingCallback((u,t,integrator)->(trace(u),norm(u)), saved_values)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Here we take `u` and save `(trace(u),norm(u))`. When we solve with this callback:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 151,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "retcode: Success\n",
       "Interpolation: 1st order linear\n",
       "t: 0-element Array{Float64,1}\n",
       "u: 0-element Array{Array{Float64,2},1}"
      ]
     },
     "execution_count": 151,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sol = solve(prob, Tsit5(), callback=cb, save_everystep=false, save_start=false, save_end = false) # Turn off normal saving"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Our values are stored in our `saved_values` variable:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 152,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "5-element Array{Float64,1}:\n",
       " 0.0     \n",
       " 0.100129\n",
       " 0.348391\n",
       " 0.683737\n",
       " 1.0     "
      ]
     },
     "execution_count": 152,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "saved_values.t"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 153,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "5-element Array{Tuple{Float64,Float64},1}:\n",
       " (501.371, 500.197)\n",
       " (554.172, 552.874)\n",
       " (710.335, 708.672)\n",
       " (993.35, 991.024) \n",
       " (1362.87, 1359.68)"
      ]
     },
     "execution_count": 153,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "saved_values.saveval"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "By default this happened only at the solver's steps. But the `SavingCallback` has similar controls as the integrator. For example, if we want to save at every `0.1` seconds, we do can so using `saveat`:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 157,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "retcode: Success\n",
       "Interpolation: 1st order linear\n",
       "t: 0-element Array{Float64,1}\n",
       "u: 0-element Array{Array{Float64,2},1}"
      ]
     },
     "execution_count": 157,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "saved_values = SavedValues(Float64, Tuple{Float64,Float64}) # New cache\n",
    "cb = SavingCallback((u,t,integrator)->(trace(u),norm(u)), saved_values, saveat = 0.0:0.1:1.0)\n",
    "sol = solve(prob, Tsit5(), callback=cb, save_everystep=false, save_start=false, save_end = false) # Turn off normal saving"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 158,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "11-element Array{Float64,1}:\n",
       " 0.0\n",
       " 0.1\n",
       " 0.2\n",
       " 0.3\n",
       " 0.4\n",
       " 0.5\n",
       " 0.6\n",
       " 0.7\n",
       " 0.8\n",
       " 0.9\n",
       " 1.0"
      ]
     },
     "execution_count": 158,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "saved_values.t"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 159,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "11-element Array{Tuple{Float64,Float64},1}:\n",
       " (501.371, 500.197)\n",
       " (554.101, 552.803)\n",
       " (612.376, 610.942)\n",
       " (676.78, 675.195) \n",
       " (747.958, 746.206)\n",
       " (826.621, 824.685)\n",
       " (913.557, 911.418)\n",
       " (1009.64, 1007.27)\n",
       " (1115.82, 1113.21)\n",
       " (1233.17, 1230.29)\n",
       " (1362.87, 1359.68)"
      ]
     },
     "execution_count": 159,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "saved_values.saveval"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Exercise 3\n",
    "\n",
    "Go back to the Harmonic oscillator. Use the `SavingCallback` to save an array for the energy over time, and do this both with and without the `ManifoldProjection`. Plot the results to see the difference the projection makes."
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Julia 0.6.2",
   "language": "julia",
   "name": "julia-0.6"
  },
  "language_info": {
   "file_extension": ".jl",
   "mimetype": "application/julia",
   "name": "julia",
   "version": "0.6.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
